|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminVerifyCustomerAddressStateContainValuesOnceTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Customer"/> |
| 14 | + <stories value="Update Customer Address"/> |
| 15 | + <title value="State/Province dropdown contain values once"/> |
| 16 | + <description value="When editing a customer in the backend from the Magento Admin Panel the State/Province should only be listed once"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-99461"/> |
| 19 | + <useCaseId value="MAGETWO-99302"/> |
| 20 | + <group value="customer"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="firstCustomer"/> |
| 24 | + <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="firstCustomer" stepKey="deleteFirstCustomer"/> |
| 28 | + <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteSecondCustomer"> |
| 29 | + <argument name="customerEmail" value="Simple_US_Customer.email"/> |
| 30 | + </actionGroup> |
| 31 | + <actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/> |
| 32 | + <actionGroup ref="logout" stepKey="logout"/> |
| 33 | + </after> |
| 34 | + |
| 35 | + <!-- Go to Customers > All Customers.--> |
| 36 | + <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/> |
| 37 | + |
| 38 | + <!--Select created customer, Click Edit mode--> |
| 39 | + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPageWithAddresses"> |
| 40 | + <argument name="customer" value="$$firstCustomer$$"/> |
| 41 | + </actionGroup> |
| 42 | + |
| 43 | + <!--Select Addresses tab--> |
| 44 | + <click selector="{{AdminEditCustomerInformationSection.addresses}}" stepKey="openAddressesTabOfFirstCustomer"/> |
| 45 | + <waitForPageLoad stepKey="waitForAddressesOfFirstCustomer"/> |
| 46 | + |
| 47 | + <!--Click on Edit link for Default Billing Address--> |
| 48 | + <click selector="{{AdminCustomerAddressesDefaultBillingSection.editButton}}" stepKey="clickEditDefaultBillingAddress"/> |
| 49 | + <waitForPageLoad stepKey="waitForCustomerAddressAddUpdateFormLoad"/> |
| 50 | + |
| 51 | + <!--Check that State/Province drop down contain all values once--> |
| 52 | + <seeNumberOfElements userInput="1" selector="{{AdminCustomerAddressesSection.regionId(US_Address_NY.state)}}" stepKey="seeOnlyOneRegionInSelectStateForFirstCustomer"/> |
| 53 | + |
| 54 | + <!--Go to Customers > All customers, Click Add new Customers, fill all necessary fields, Save--> |
| 55 | + <actionGroup ref="AdminCreateCustomerWithWebSiteAndGroup" stepKey="createSimpleUSCustomerWithoutAddress"/> |
| 56 | + |
| 57 | + <!--Select new created customer, Click Edit mode--> |
| 58 | + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPageWithoutAddresses"> |
| 59 | + <argument name="customer" value="Simple_US_Customer"/> |
| 60 | + </actionGroup> |
| 61 | + |
| 62 | + <!--Select Addresses tab, Click on create new addresses btn--> |
| 63 | + <click selector="{{AdminEditCustomerInformationSection.addresses}}" stepKey="openAddressesTabOfSecondCustomer"/> |
| 64 | + <waitForPageLoad stepKey="waitForAddressesOfSecondCustomer"/> |
| 65 | + <click selector="{{AdminCustomerAddressesSection.addNewAddress}}" stepKey="clickAddNewAddressButton"/> |
| 66 | + <waitForPageLoad stepKey="waitForAddUpdateCustomerAddressForm"/> |
| 67 | + |
| 68 | + <!--Select Country = United States and check that State/Province drop down contain all values once--> |
| 69 | + <click selector="{{AdminCustomerAddressesSection.country}}" stepKey="clickCountryToOpenListOfCountries"/> |
| 70 | + <click selector="{{AdminCustomerAddressesSection.countryId(US_Address_NY.country_id)}}" stepKey="fillCountry"/> |
| 71 | + <seeNumberOfElements userInput="1" selector="{{AdminCustomerAddressesSection.regionId(US_Address_NY.state)}}" stepKey="seeOnlyOneRegionInSelectStateForSecondCustomer"/> |
| 72 | + </test> |
| 73 | +</tests> |
0 commit comments