Skip to content

Commit

Permalink
Merge pull request #5553 from magento-pangolin/MQE-1957
Browse files Browse the repository at this point in the history
MQE-2046: remove deprecated entities usages in MFTF tests
  • Loading branch information
slavvka authored Apr 11, 2020
2 parents f7875fc + 7e5b5b1 commit 86515dd
Show file tree
Hide file tree
Showing 158 changed files with 331 additions and 1,776 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</annotations>

<before>
<actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminMessagesSection">
<!-- Keep both sets of elements -->
<!-- Set One - more specific, works for most of message blocks -->
<element name="success" type="text" selector="#messages div.message-success"/>
<element name="nthSuccess" type="text" selector=".message.message-success.success:nth-of-type({{n}})>div" parameterized="true"/>
<element name="error" type="text" selector="#messages div.message-error"/>
<element name="notice" type="text" selector=".message.message-notice.notice"/>
<element name="messageByType" type="text" selector="#messages div.message-{{messageType}}" parameterized="true" />
<element name="warning" type="text" selector="#messages div.message-warning"/>
<element name="accessDenied" type="text" selector=".access-denied-page"/>
<!-- Deprecated elements, please do not use them. Use elements above-->
<!-- Elements below are too common and catch non messages blocks. Ex: system messages blocks-->
<!-- Set Two - more generic, needed for message blocks in Product Import, Staging Update, etc -->
<element name="successMessage" type="text" selector=".message-success"/>
<element name="errorMessage" type="text" selector=".message.message-error.error"/>
<element name="warningMessage" type="text" selector=".message-warning"/>
Expand Down
27 changes: 0 additions & 27 deletions app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@
<!--Go to storefront-->
<amOnPage url="" stepKey="DoToStorefront"/>
<!--Create account-->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUserFromStorefrontActionGroup">
<argument name="Customer" value="Simple_US_Customer"/>
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
<argument name="customer" value="Simple_US_Customer"/>
</actionGroup>
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeSuccessMessage">
<argument name="messageType" value="success"/>
<argument name="message" value="Thank you for registering with Main Website Store."/>
</actionGroup>

<!--Add product to cart-->
<amOnPage url="$$product.sku$$.html" stepKey="goToProductPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,14 @@
<argument name="price" value="Discount"/>
<argument name="amount" value="50"/>
</actionGroup>
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser">
<argument name="Customer" value="CustomerEntityOne"/>
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
<argument name="customer" value="CustomerEntityOne"/>
</actionGroup>
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeSuccessMessage">
<argument name="messageType" value="success"/>
<argument name="message" value="Thank you for registering with Main Website Store."/>
</actionGroup>
<amOnPage url="{{StorefrontProductPage.url(BundleProduct.urlKey)}}" stepKey="goToStorefront"/>
<waitForPageLoad stepKey="waitForStorefront"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
</actionGroup>

<!-- Assert first bundle products in category product grid -->
<actionGroup ref="AssertProductOnCategoryPageActionGroup" stepKey="assertFirstBundleProduct">
<argument name="product" value="$$createFirstBundleProduct$$"/>
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="assertFirstBundleProduct">
<argument name="productName" value="$$createFirstBundleProduct.name$$"/>
</actionGroup>
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeFromForFirstBundleProduct">
<argument name="selector" value="{{StorefrontCategoryProductSection.priceFromByProductId($$createFirstBundleProduct.id$$)}}"/>
Expand All @@ -133,8 +133,8 @@
</actionGroup>

<!-- Assert second bundle products in category product grid -->
<actionGroup ref="AssertProductOnCategoryPageActionGroup" stepKey="assertSecondBundleProduct">
<argument name="product" value="$$createSecondBundleProduct$$"/>
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="assertSecondBundleProduct">
<argument name="productName" value="$$createSecondBundleProduct.name$$"/>
</actionGroup>
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeFromForSecondBundleProduct">
<argument name="selector" value="{{StorefrontCategoryProductSection.priceFromByProductId($$createSecondBundleProduct.id$$)}}"/>
Expand All @@ -146,8 +146,8 @@
</actionGroup>

<!-- Assert third bundle products in category product grid -->
<actionGroup ref="AssertProductOnCategoryPageActionGroup" stepKey="assertThirdBundleProduct">
<argument name="product" value="$$createThirdBundleProduct$$"/>
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="assertThirdBundleProduct">
<argument name="productName" value="$$createThirdBundleProduct.name$$"/>
</actionGroup>
<actionGroup ref="AssertStorefrontElementVisibleActionGroup" stepKey="seePriceRangeFromForThirdBundleProduct">
<argument name="selector" value="{{StorefrontCategoryProductSection.priceFromByProductId($$createThirdBundleProduct.id$$)}}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminLoginWithCaptchaActionGroup" extends="LoginAsAdmin">
<actionGroup name="AdminLoginWithCaptchaActionGroup" extends="AdminLoginActionGroup">
<annotations>
<description>EXTENDS: LoginAsAdmin. Fills in the Captcha field on the Backend Admin Login page.</description>
</annotations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<magentoCLI command="config:set {{AdminCaptchaDefaultSymbolsConfigData.path}} {{AdminCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" />
<magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
</after>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminWithWrongCredentialsFirstAttempt">
<argument name="username" value="{{AdminUserWrongCredentials.username}}"/>
<argument name="password" value="{{AdminUserWrongCredentials.password}}"/>
Expand All @@ -54,17 +54,19 @@

<!-- Submit form with incorrect captcha -->
<actionGroup ref="AdminLoginWithCaptchaActionGroup" stepKey="loginAsAdminWithIncorrectCaptcha">
<argument name="adminUser" value="DefaultAdminUser" />
<argument name="captcha" value="{{WrongCaptcha.value}}" />
<argument name="username" value="{{DefaultAdminUser.username}}"/>
<argument name="password" value="{{DefaultAdminUser.password}}"/>
<argument name="captcha" value="{{WrongCaptcha.value}}"/>
</actionGroup>
<actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="seeIncorrectCaptchaErrorMessage">
<argument name="message" value="Incorrect CAPTCHA." />
<argument name="message" value="Incorrect CAPTCHA."/>
</actionGroup>
<actionGroup ref="AssertCaptchaVisibleOnAdminLoginFormActionGroup" stepKey="assertCaptchaVisibleAfterIncorrectCaptcha" />

<actionGroup ref="AdminLoginWithCaptchaActionGroup" stepKey="loginAsAdminWithCorrectCaptcha">
<argument name="adminUser" value="DefaultAdminUser" />
<argument name="captcha" value="{{PreconfiguredCaptcha.value}}" />
<argument name="username" value="{{DefaultAdminUser.username}}"/>
<argument name="password" value="{{DefaultAdminUser.password}}"/>
<argument name="captcha" value="{{PreconfiguredCaptcha.value}}"/>
</actionGroup>
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="verifyAdminLoggedIn" />
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AddSimpleProductToCartActionGroup" deprecated="Avoid using super-ActionGroups. Use StorefrontOpenProductEntityPageActionGroup, StorefrontAddSimpleProductToCartActionGroup and StorefrontAssertProductAddedToCartResultMessageActionGroup">
<actionGroup name="AddSimpleProductToCartActionGroup">
<annotations>
<description>Navigates to the Storefront Product page. Then adds the Product to the Cart. Validates that the Success Message is present and correct.</description>
<description>Only works on Storefront Product Page - Add Simple Product to Cart</description>
</annotations>
<arguments>
<argument name="product" defaultValue="product"/>
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 86515dd

Please sign in to comment.