-
Notifications
You must be signed in to change notification settings - Fork 9.3k
/
AdminSearchCustomerAddressByKeywordTest.xml
47 lines (45 loc) · 2.81 KB
/
AdminSearchCustomerAddressByKeywordTest.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminSearchCustomerAddressByKeywordTest">
<annotations>
<title value="Admin search customer address by keyword"/>
<description value="Admin search customer address by keyword"/>
<features value="Module/ Customer"/>
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-94954"/>
<stories value="MAGETWO-94346: Implement handling of large number of addresses on admin edit customer page"/>
<group value="customer"/>
</annotations>
<before>
<createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/>
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
</before>
<after>
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<!-- -
Step1. Login to admin and go to Customers > All Customerts.
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="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
<argument name="customer" value="Simple_US_Customer_Multiple_Addresses"/>
</actionGroup>
<click selector="{{AdminEditCustomerInformationSection.addresses}}" stepKey="openAddressesTab"/>
<conditionalClick selector="{{AdminCustomerAddressFiltersSection.clearAll}}" dependentSelector="{{AdminCustomerAddressFiltersSection.clearAll}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
<!--Step4. Fill *Search by keyword* filed with the query and press enter or clock on the magnifier icon-->
<fillField userInput="{{US_Address_NY.street[0]}}" selector="{{AdminCustomerAddressesGridActionsSection.search}}" stepKey="FillCustomerAddressStreetInSearchByKeyword"/>
<pressKey parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" selector="{{AdminCustomerAddressesGridActionsSection.search}}" stepKey="pressEnterKey"/>
<waitForPageLoad stepKey="waitForCustomerAddressesGridPageLoad"/>
<seeNumberOfElements userInput="1" selector="{{AdminCustomerAddressesGridSection.rowsInGrid}}" stepKey="seeOnlyOneCustomerAddressesInGrid"/>
</test>
</tests>