Skip to content

Commit

Permalink
merge magento-commerce/2.4-develop into magento-tsg/2.4-develop-sidec…
Browse files Browse the repository at this point in the history
…ar-pr8
  • Loading branch information
magento-mts-svc authored Dec 1, 2020
2 parents 24305f3 + 479f304 commit 8ce46f9
Show file tree
Hide file tree
Showing 24 changed files with 289 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,27 @@
<waitForPageLoad stepKey="waitForPageToLoad"/>
<!-- Create three level deep sub Category -->
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickAddSubCategoryButton"/>
<waitForPageLoad stepKey="waitForAddSubCategoryClick1"/>
<waitForElementVisible selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" stepKey="waitForSubCategoryName1"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{FirstLevelSubCat.name}}" stepKey="fillSubCategoryName"/>
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveFirstLevelSubCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
<waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButtonAgain"/>
<waitForPageLoad stepKey="waitForAddSubCategoryClick2"/>
<waitForElementVisible selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" stepKey="waitForSubCategoryName2"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SecondLevelSubCat.name}}" stepKey="fillSecondLevelSubCategoryName"/>
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveSecondLevelSubCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSaveSuccessMessage"/>
<waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSaveSuccessMessage"/>
<grabFromCurrentUrl stepKey="categoryId" regex="#\/([0-9]*)?\/$#" />

<!-- Move Category to another position in category tree, but click cancel button -->
<dragAndDrop selector1="{{AdminCategorySidebarTreeSection.categoryInTree(SecondLevelSubCat.name)}}" selector2="{{AdminCategorySidebarTreeSection.categoryInTree('Default Category')}}" stepKey="moveCategory"/>
<see selector="{{AdminCategoryModalSection.message}}" userInput="This operation can take a long time" stepKey="seeWarningMessage"/>
<waitForText selector="{{AdminCategoryModalSection.message}}" userInput="This operation can take a long time" stepKey="seeWarningMessage"/>
<click selector="{{AdminCategoryModalSection.cancel}}" stepKey="clickCancelButtonOnWarningPopup"/>
<!-- Verify Category in store front page after clicking cancel button -->
<amOnPage url="/$$createDefaultCategory.name$$/{{FirstLevelSubCat.name}}/{{SecondLevelSubCat.name}}.html" stepKey="seeTheCategoryInStoreFrontPage"/>
<waitForPageLoad stepKey="waitForStoreFrontPageLoad"/>
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="seeDefaultCategoryOnStoreNavigationBar"/>
<waitForElementVisible selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="seeDefaultCategoryOnStoreNavigationBar"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="dontSeeSubCategoryOnStoreNavigationBar"/>
<!-- Verify breadcrumbs in store front page after clicking cancel button -->
<grabMultiple selector="{{StorefrontNavigationSection.categoryBreadcrumbs}}" stepKey="breadcrumbs"/>
Expand All @@ -67,17 +71,18 @@
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openTheAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<dragAndDrop selector1="{{AdminCategorySidebarTreeSection.categoryInTree(SecondLevelSubCat.name)}}" selector2="{{AdminCategorySidebarTreeSection.categoryInTree('Default Category')}}" stepKey="DragCategory"/>
<see selector="{{AdminCategoryModalSection.message}}" userInput="This operation can take a long time" stepKey="seeWarningMessageForOneMoreTime"/>
<waitForText selector="{{AdminCategoryModalSection.message}}" userInput="This operation can take a long time" stepKey="seeWarningMessageForOneMoreTime"/>
<waitForElementVisible selector="{{AdminCategoryModalSection.ok}}" stepKey="waitForOkButtonOnWarningPopup"/>
<click selector="{{AdminCategoryModalSection.ok}}" stepKey="clickOkButtonOnWarningPopup"/>
<waitForPageLoad stepKey="waitTheForPageToLoad"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You moved the category." stepKey="seeSuccessMoveMessage"/>
<waitForText selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You moved the category." stepKey="seeSuccessMoveMessage"/>
<amOnPage url="/{{SimpleSubCategory.name}}.html" stepKey="seeCategoryNameInStoreFrontPage"/>
<waitForPageLoad stepKey="waitForStoreFrontPageToLoad"/>
<!-- Verify Category in store front after moving category to another position in category tree -->
<amOnPage url="{{StorefrontCategoryPage.url(SecondLevelSubCat.name)}}" stepKey="amOnCategoryPage"/>
<waitForPageLoad stepKey="waitForPageToBeLoaded"/>
<seeElement selector="{{StorefrontCategoryMainSection.CategoryTitle(SecondLevelSubCat.name)}}" stepKey="seeCategoryInTitle"/>
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SecondLevelSubCat.name)}}" stepKey="seeCategoryOnStoreNavigationBarAfterMove"/>
<waitForElementVisible selector="{{StorefrontCategoryMainSection.CategoryTitle(SecondLevelSubCat.name)}}" stepKey="seeCategoryInTitle"/>
<waitForElementVisible selector="{{StorefrontHeaderSection.NavigationCategoryByName(SecondLevelSubCat.name)}}" stepKey="seeCategoryOnStoreNavigationBarAfterMove"/>
<!-- Verify breadcrumbs in store front page after moving category to another position in category tree -->
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SecondLevelSubCat.name)}}" stepKey="clickCategoryOnNavigation"/>
<waitForPageLoad stepKey="waitForCategoryLoad"/>
Expand All @@ -91,6 +96,7 @@
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="openUrlRewriteIndexPage"/>
<waitForPageLoad stepKey="waitForUrlRewritePageLoad"/>
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/>
<waitForElementVisible selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" stepKey="waitForCategoryUrlKey"/>
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="{{SecondLevelSubCat.name_lwr}}.html" stepKey="fillCategoryUrlKey"/>
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters"/>
<waitForPageLoad stepKey="waitForSearch"/>
Expand All @@ -102,6 +108,7 @@
<see selector="{{AdminUrlRewriteIndexSection.gridCellByColumnRowNumber('2', 'Redirect Type')}}" userInput="No" stepKey="verifyTheRedirectTypeAfterMove"/>
<!-- Verify before move Redirect Path displayed with associated Target Path and Redirect Type-->
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters1"/>
<waitForElementVisible selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" stepKey="waitForTheCategoryUrlKey"/>
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="{{SecondLevelSubCat.name_lwr}}" stepKey="fillTheCategoryUrlKey"/>
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters1"/>
<waitForPageLoad stepKey="waitForSearch1"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontClickOrderLinkFromCheckoutSuccessPageActionGroup">
<annotations>
<description>Clicks the order number link from the checkout success page</description>
</annotations>
<click selector="{{CheckoutSuccessMainSection.orderLink}}" stepKey="clickOrderLink"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<waitForText selector="{{StorefrontCustomerAccountMainSection.pageTitle}}" userInput="Order #" stepKey="waitForPageTitle"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontOpenCustomStoreCheckoutPageActionGroup" extends="StorefrontOpenCheckoutPageActionGroup">
<annotations>
<description>Goes to the Storefront Checkout page in a custom store. Must have Add Store Code To Urls enabled</description>
</annotations>
<arguments>
<argument name="storeCode" defaultValue="{{customStoreEN.code}}" type="string"/>
</arguments>
<amOnPage url="{{StorefrontCustomStoreCheckoutPage.url(storeCode)}}" stepKey="openCheckoutPage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="StorefrontCustomStoreCheckoutPage" url="/{{storeCode}}/checkout" area="storefront" module="Magento_Checkout" parameterized="true">
<section name="StorefrontCheckoutPageMessagesSection"/>
<section name="CheckoutShippingSection"/>
<section name="CheckoutShippingMethodsSection"/>
<section name="CheckoutOrderSummarySection"/>
<section name="CheckoutSuccessMainSection"/>
<section name="CheckoutPaymentSection"/>
<section name="SelectShippingBillingPopupSection"/>
</page>
</pages>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<element name="checkPaymentMethodByName" type="radio" selector="//div[@id='checkout-payment-method-load']//div[@class='payment-method']//label//span[contains(., '{{methodName}}')]/../..//input" parameterized="true"/>
<element name="billingAddressSameAsShipping" type="checkbox" selector=".payment-method._active [name='billing-address-same-as-shipping']"/>
<element name="billingAddressSameAsShippingShared" type="checkbox" selector="#billing-address-same-as-shipping-shared"/>
<element name="paymentOnAccount" type="radio" selector="#companycredit"/>
<element name="paymentOnAccountLabel" type="text" selector="//span[text()='Payment on Account']"/>
<element name="paymentOnAccount" type="radio" selector="#companycredit" deprecated="Use StorefrontCheckoutPaymentSection.paymentOnAccount B2B repository"/>
<element name="paymentOnAccountLabel" type="text" selector="//span[text()='Payment on Account']" deprecated="Use StorefrontCheckoutPaymentSection.paymentOnAccountLabel in B2B repository"/>
<element name="purchaseOrderNumber" type="input" selector="#po_number"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@
<waitForPageLoad stepKey="waitForPageLoad"/>
<see userInput="Your coupon was successfully applied." stepKey="seeSuccessMessage"/>
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder1"/>
<waitForPageLoad stepKey="waitForError"/>
<see stepKey="seeShippingMethodError" userInput="The shipping method is missing. Select the shipping method and try again."/>
<!-- Cannot use waitForPageLoad as the below error message will disappear after a few seconds & waitForPageLoad will cause this test to be flaky -->
<comment userInput="BIC workaround" stepKey="waitForError"/>
<waitForText stepKey="seeShippingMethodError" userInput="The shipping method is missing. Select the shipping method and try again."/>
<amOnPage stepKey="navigateToShippingPage" url="{{CheckoutShippingPage.url}}"/>
<waitForPageLoad stepKey="waitForShippingPageLoad"/>
<click stepKey="chooseFlatRateShipping" selector="{{CheckoutShippingMethodsSection.shippingMethodRowByName('Flat Rate')}}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<argument name="productName" value="$$simpleProduct.name$$"/>
</actionGroup>
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>

<!--Check the minicart is empty and verify AssertProductAbsentInMiniShoppingCart-->
<actionGroup ref="AssertMiniCartEmptyActionGroup" stepKey="miniCartEnpty"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminOpenAccountInformationTabFromCustomerEditPageActionGroup">
<annotations>
<description>Open Account Information tab from Customer's edit page</description>
</annotations>
<waitForElementVisible selector="{{AdminCustomerAccountInformationSection.accountInformationTab}}" stepKey="waitForAccountInformationTab"/>
<click selector="{{AdminCustomerAccountInformationSection.accountInformationTab}}" stepKey="clickAccountInformationTab"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminSuccessfullySetCustomerActiveViaGridActionGroup">
<annotations>
<description>Sets a Customer to the Active status from the admin All Customers grid</description>
</annotations>
<arguments>
<argument name="customerEmail" type="string" defaultValue="{{Simple_US_CA_Customer.email}}"/>
</arguments>
<waitForElementVisible selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}" stepKey="waitForCustomerRow"/>
<click selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}" stepKey="selectCustomer"/>
<click selector="{{AdminCustomerGridMainActionsSection.actions}}" stepKey="clickActions"/>
<waitForElementVisible selector="{{AdminCustomerGridMainActionsSection.setActive}}" stepKey="waitForDropDownOpen"/>
<click selector="{{AdminCustomerGridMainActionsSection.setActive}}" stepKey="clickSetActive"/>
<waitForPageLoad stepKey="waitForLoad"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) were updated." stepKey="seeSuccessMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminSuccessfullySetCustomerInactiveViaGridActionGroup" extends="AdminSuccessfullySetCustomerActiveViaGridActionGroup">
<annotations>
<description>Sets a Customer to the Inactive status from the admin All Customers grid</description>
</annotations>
<waitForElementVisible selector="{{AdminCustomerGridMainActionsSection.setInactive}}" stepKey="waitForDropDownOpen"/>
<click selector="{{AdminCustomerGridMainActionsSection.setInactive}}" stepKey="clickSetActive"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontCustomStoreCustomerLogoutActionGroup" extends="StorefrontCustomerLogoutActionGroup">
<annotations>
<description>Goes to the storefront Customer Logout page for a custom store. Must have Add Store Code To Urls enabled.</description>
</annotations>
<arguments>
<argument name="storeCode" defaultValue="{{customStoreEN.code}}" type="string"/>
</arguments>
<amOnPage url="{{StorefrontCustomStoreCustomerLogoutPage.url(storeCode)}}" stepKey="storefrontSignOut"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontCustomStoreLoginActionGroup" extends="LoginToStorefrontActionGroup">
<annotations>
<description>Goes to the storefront Customer Sign In page for a custom store. Logs in using the provided Customer. Must have Add Store Code To Urls enabled</description>
</annotations>
<arguments>
<argument name="storeCode" defaultValue="{{customStoreEN.code}}" type="string"/>
</arguments>
<amOnPage url="{{StorefrontCustomStoreCustomerSignInPage.url(storeCode)}}" stepKey="amOnSignInPage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontCustomStoreNavigateToCustomerOrdersHistoryPageActionGroup" extends="StorefrontNavigateToCustomerOrdersHistoryPageActionGroup">
<annotations>
<description>Goes to the storefront Customer Order History page for a custom store. Must have Add Store Code To Urls enabled</description>
</annotations>
<arguments>
<argument name="storeCode" defaultValue="{{customStoreEN.code}}" type="string"/>
</arguments>
<amOnPage url="{{StorefrontCustomStoreCustomerOrdersHistoryPage.url(storeCode)}}" stepKey="amOnTheCustomerPage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontGoToCustomerAddressesPageActionGroup">
<annotations>
<description>Goes to the storefront customer addresses page</description>
</annotations>
<amOnPage url="{{StorefrontCustomerAddressesPage.url}}" stepKey="goToAddressPage"/>
</actionGroup>
</actionGroups>
Loading

0 comments on commit 8ce46f9

Please sign in to comment.