Skip to content

Commit

Permalink
ENGCOM-8275: [MFTF] add AdminOpenCustomersGridActionGroup #30079
Browse files Browse the repository at this point in the history
 - Merge Pull Request #30079 from Usik2203/magento2:add-AdminOpenCustomersGridActionGroup
 - Merged commits:
   1. e8f7b17
   2. 2d04a8d
   3. 670d3a0
   4. 7b93b53
  • Loading branch information
magento-engcom-team committed Oct 21, 2020
2 parents 9772213 + 7b93b53 commit 2ff303d
Show file tree
Hide file tree
Showing 25 changed files with 47 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@
<waitForPageLoad stepKey="waitForCustomersPage"/>
<see userInput="You saved the customer." stepKey="CustomerIsSaved"/>

<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
<waitForPageLoad stepKey="waitForPageLoad1" />
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomers"/>
<click selector="{{AdminCustomerFiltersSection.clearAll}}" stepKey="ClearFilters"/>
<waitForPageLoad stepKey="waitForFiltersClear"/>

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="AdminOpenCustomersGridActionGroup">
<annotations>
<description>Open the Admin Customers grid page.</description>
</annotations>

<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
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="NavigateToAllCustomerPage">
<actionGroup name="NavigateToAllCustomerPage" deprecated="Use AdminOpenCustomersGridActionGroup instead.">
<annotations>
<description>Goes to the Admin Customers grid page.</description>
</annotations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Step2. On *Customers* page choose customer from preconditions and open it to edit
Step3. Open *Addresses* tab on edit customer page and press *Add New Address* button
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses_No_Default_Address"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
<after>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<!-- Reset customer grid filter -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToCustomersGridPage"/>
<waitForPageLoad stepKey="waitForCustomersGrid"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="goToCustomersGridPage"/>
<actionGroup ref="AdminResetFilterInCustomerGrid" stepKey="resetFilter"/>

<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<!--Delete created data-->
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<deleteData createDataKey="createCustomerGroup" stepKey="deleteCustomerGroup"/>
<actionGroup ref="NavigateToAllCustomerPage" stepKey="navigateToCustomersPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomersPage"/>
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearCustomersGridFilter"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</after>

<actionGroup ref="NavigateToAllCustomerPage" stepKey="navigateToCustomersPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomersPage"/>
<actionGroup ref="AdminFilterCustomerGridByEmail" stepKey="filterCustomer">
<argument name="email" value="$$createCustomer.email$$"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
</actionGroup>

<!--Assert verify created new customer in grid-->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
<waitForPageLoad stepKey="waitForNavigateToCustomersPageLoad"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomers"/>
<click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="clickFilterButton"/>
<fillField userInput="{{CustomerEntityOne.email}}" selector="{{AdminCustomerFiltersSection.emailInput}}" stepKey="filterEmail"/>
<click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="clickApplyFilter"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Step2. On *Customers* page choose customer from preconditions and open it to edit
Step3. On edit customer page open *Addresses* tab and find a grid with the additional addresses
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Step2. On *Customers* page choose customer from preconditions and open it to edit
Step3. On edit customer page open *Addresses* tab and find a grid with the additional addresses
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Step1. Login to admin and go to Customers > All Customers.
Step2. On *Customers* page choose customer from preconditions and open it to edit
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Step2. On *Customers* page choose customer from preconditions and open it to edit
Step3. Open *Addresses* tab on edit customer page and press *Add New Address* button
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<after>
<deleteData createDataKey="createFirstCustomer" stepKey="deleteFirstCustomer"/>
<deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminResetFilterInCustomerAddressGrid" stepKey="clearCustomerGridFilter"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!--Step 1: Go to Customers > All Customers-->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<!--Step 2: On Customers grid page search customer by keyword with quotes-->
<actionGroup ref="SearchAdminDataGridByKeywordActionGroup" stepKey="searchCustomer">
<argument name="keyword" value="$$createSecondCustomer.firstname$$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<deleteData createDataKey="secondCustomer" stepKey="deleteSecondCustomer"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomerPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomerPage"/>
<!-- search Admin Data Grid By Keyword -->
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
<fillField selector="{{AdminDataGridHeaderSection.search}}" userInput="$$secondCustomer.email$$" stepKey="fillKeywordSearchFieldWithSecondCustomerEmail"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<deleteData createDataKey="thirdCustomer" stepKey="deleteThirdCustomer"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomerPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomerPage"/>
<!-- Select all from dropdown -->
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters" />
<actionGroup ref="AdminGridSelectAllActionGroup" stepKey="selectAllCustomers"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Step2. On *Customers* page choose customer from preconditions and open it to edit
Step3. On edit customer page open *Addresses* tab and find a grid with the additional addresses
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Step2. On *Customers* page choose customer from preconditions and open it to edit
Step3. On edit customer page open *Addresses* tab and find a grid with the additional addresses
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses_No_Default_Address"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Step2. On *Customers* page choose customer from preconditions and open it to edit
Step3. On edit customer page open *Addresses* tab and find a grid with the additional addresses
<!- -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses_No_Default_Address"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
</before>
<after>
<deleteData stepKey="deleteCustomer" createDataKey="customer"/>
<!-- Reset customer grid filter -->
<amOnPage stepKey="goToCustomersGridPage" url="{{AdminCustomerPage.url}}"/>
<waitForPageLoad stepKey="waitForCustomersGrid"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="goToCustomersGridPage"/>
<actionGroup stepKey="resetFilter" ref="AdminResetFilterInCustomerGrid"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
Expand All @@ -47,9 +45,7 @@
<argument name="customerAddress" value="CustomerAddressSimple"/>
</actionGroup>
<actionGroup stepKey="saveAndCheckSuccessMessage" ref="AdminSaveCustomerAndAssertSuccessMessage"/>
<!-- Assert Customer in Customer grid -->
<amOnPage stepKey="goToCustomersGridPage" url="{{AdminCustomerPage.url}}"/>
<waitForPageLoad stepKey="waitForCustomersGrid"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="goToCustomersGridPage"/>
<actionGroup stepKey="resetFilter" ref="AdminResetFilterInCustomerGrid"/>
<actionGroup stepKey="filterByEamil" ref="AdminFilterCustomerGridByEmail">
<argument name="email" value="updated$$customer.email$$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
<actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<!-- Go to Customers > All Customers.-->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>

<!--Select created customer, Click Edit mode-->
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPageWithAddresses">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@
<waitForPageLoad stepKey="waitForCustomersPage"/>
<!--Go to Customers grid and check that filter countries amount is the same as initial allowed countries amount-->
<comment userInput="Go to Customers grid and check that filter countries amount is the same as initial allowed countries amount" stepKey="compareCountriesAmount"/>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToCustomersGrid"/>
<waitForPageLoad stepKey="waitForCustomersGrid"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="goToCustomersGrid"/>
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openFiltersSectionOnCustomersGrid"/>
<executeJS function="var len = document.querySelectorAll('{{AdminCustomerFiltersSection.countryOptions}}').length; return len-1;" stepKey="countriesAmount2"/>
<assertEquals stepKey="assertCountryAmounts">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<after>
<deleteData createDataKey="createFirstCustomer" stepKey="deleteFirstCustomer"/>
<deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminResetFilterInCustomerAddressGrid" stepKey="clearCustomerGridFilter"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!--Step 1: Go to Customers > All Customers-->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<!--Step 2: On Customers grid page search customer by keyword-->
<actionGroup ref="SearchAdminDataGridByKeywordActionGroup" stepKey="searchCustomer">
<argument name="keyword" value="$$createSecondCustomer.email$$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigurableProduct"/>
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomerIndexPage"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomerIndexPage"/>
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearCustomerGridFilter"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@
<!-- Login as admin -->
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

<!-- Open Customers -> All Customers -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<waitForPageLoad stepKey="waitForCustomerPageLoad"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="$$createCustomer$$"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@
<!-- Login as admin -->
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

<!-- Open Customers -> All Customers -->
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
<waitForPageLoad stepKey="waitForCustomerPageLoad"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="$$createCustomer$$"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</actionGroup>
<actionGroup ref="AssertAdminDashboardPageIsVisibleActionGroup" stepKey="seeDashboardPage"/>
<wait time="120" stepKey="waitForUserToExpire"/>
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomers"/>
<!-- Confirm that user is logged out -->
<seeInCurrentUrl url="{{AdminLoginPage.url}}" stepKey="seeAdminLoginUrl"/>

Expand Down

0 comments on commit 2ff303d

Please sign in to comment.