|
| 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="AdminVerifyCustomerAddressRegionFieldTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Customer"/> |
| 14 | + <stories value="Region field is getting blank after selecting any region for a country"/> |
| 15 | + <title value="Region field is not getting blank after selecting any region for a country"/> |
| 16 | + <description value="After saving customer address details in the admin without state/region, it will disappered from the address section."/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-8302"/> |
| 19 | + <useCaseId value="ACP2E-1609"/> |
| 20 | + <group value="customer"/> |
| 21 | + </annotations> |
| 22 | + |
| 23 | + <before> |
| 24 | + <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="firstCustomer"/> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 26 | + </before> |
| 27 | + |
| 28 | + <after> |
| 29 | + <deleteData createDataKey="firstCustomer" stepKey="deleteFirstCustomer"/> |
| 30 | + <actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/> |
| 31 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 32 | + </after> |
| 33 | + |
| 34 | + <!--Open customer grid page--> |
| 35 | + <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/> |
| 36 | + |
| 37 | + <!--Select created customer and click edit mode--> |
| 38 | + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPageWithAddresses"> |
| 39 | + <argument name="customer" value="$$firstCustomer$$"/> |
| 40 | + </actionGroup> |
| 41 | + |
| 42 | + <!--Select Addresses tab --> |
| 43 | + <click selector="{{AdminEditCustomerInformationSection.addresses}}" stepKey="openAddressesTabOfFirstCustomer"/> |
| 44 | + <waitForPageLoad stepKey="waitForAddressesOfFirstCustomer"/> |
| 45 | + |
| 46 | + <!--Click on Edit link for Default Billing Address--> |
| 47 | + <click selector="{{AdminCustomerAddressesDefaultBillingSection.editButton}}" stepKey="clickEditDefaultBillingAddress"/> |
| 48 | + <waitForPageLoad stepKey="waitForCustomerAddressAddUpdateFormLoad"/> |
| 49 | + |
| 50 | + <!-- Select Country = Canada And Region =Saskatchewan , Click on Save Button --> |
| 51 | + <click selector="{{AdminCustomerAddressesSection.country}}" stepKey="clickCountryToOpenListOfCountries"/> |
| 52 | + <click selector="{{AdminCustomerAddressesSection.countryId(Canada_Address.country_id)}}" stepKey="fillCountry"/> |
| 53 | + <click selector="{{AdminCustomerAddressesSection.state}}" stepKey="clickRegionToOpenListOfRegions"/> |
| 54 | + <click selector="{{AdminCustomerAddressesSection.regionId(Canada_Address.state)}}" stepKey="fillRegion"/> |
| 55 | + <click selector="{{AdminCustomerAddressesSection.saveAddress}}" stepKey="clickSaveCustomer"/> |
| 56 | + |
| 57 | + <!--Verify state name in address details section--> |
| 58 | + <see userInput="{{Canada_Address.state}}" selector="{{AdminCustomerAddressesSection.regionId(Canada_Address.state)}}" stepKey="seeStateInAddress"/> |
| 59 | + |
| 60 | + <!-- Click on edit link for default billing address , deselect region and click on save button--> |
| 61 | + <click selector="{{AdminCustomerAddressesDefaultBillingSection.editButton}}" stepKey="clickEditDefaultBillingAddressAgain"/> |
| 62 | + <waitForPageLoad stepKey="waitForCustomerAddressAddUpdateFormLoad2"/> |
| 63 | + <selectOption selector="{{AdminCustomerAddressesSection.state}}" userInput="Please select a region, state or province." stepKey="selectState"/> |
| 64 | + <click selector="{{AdminCustomerAddressesSection.saveAddress}}" stepKey="clickSaveCustomerAgain"/> |
| 65 | + |
| 66 | + <!--Open/Reload customer details page--> |
| 67 | + <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPageAgain"> |
| 68 | + <argument name="customerId" value="$firstCustomer.id$"/> |
| 69 | + </actionGroup> |
| 70 | + |
| 71 | + <!--Verify state name not visible under address details section--> |
| 72 | + <dontSee userInput="{{Canada_Address.state}}" selector="{{AdminCustomerAddressesDefaultBillingSection.addressDetails}}" stepKey="dontSeeStateInAddress"/> |
| 73 | + </test> |
| 74 | + </tests> |
0 commit comments