|
| 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="VerifyCustomerAddressRegionFieldTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Customer"/> |
| 14 | + <stories value="The State-Region field should stay blank after it's cleared from the customer address and saved"/> |
| 15 | + <title value="The State-Region field should stay blank after it's cleared from the customer address and saved"/> |
| 16 | + <description value="When removing the state from the customer address details in the admin, the field must stay blank after save."/> |
| 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" stepKey="createCustomer"/> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 26 | + </before> |
| 27 | + |
| 28 | + <after> |
| 29 | + <deleteData createDataKey="createCustomer" stepKey="deleteCreateCustomer"/> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 31 | + </after> |
| 32 | + |
| 33 | + <!--Open customer grid page and Navigate to customer edit page addresses tab for created customer--> |
| 34 | + <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/> |
| 35 | + <actionGroup ref="AdminNavigateCustomerEditPageAddressesTabActionGroup" stepKey="openEditCustomerPageWithAddresses"> |
| 36 | + <argument name="customerId" value="$createCustomer.id$"/> |
| 37 | + </actionGroup> |
| 38 | + |
| 39 | + <!--Click on edit default billing address and update the address--> |
| 40 | + <actionGroup ref="AdminClickEditLinkForDefaultBillingAddressActionGroup" stepKey="clickEditDefaultBillingAddress"/> |
| 41 | + <actionGroup ref="AdminFillAndSaveCustomerAddressWithoutRegionActionGroup" stepKey="fillAndSaveCustomerAddressInformation"> |
| 42 | + <argument name="address" value="updateCustomerFranceAddress"/> |
| 43 | + </actionGroup> |
| 44 | + |
| 45 | + <!--Verify state name in address details section--> |
| 46 | + <see selector="{{AdminCustomerAddressesDefaultBillingSection.addressDetails}}" userInput="{{updateCustomerFranceAddress.state}}" stepKey="seeStateInAddress"/> |
| 47 | + |
| 48 | + <!--Click on edit link for default billing address , remove the region--> |
| 49 | + <actionGroup ref="AdminClickEditLinkForDefaultBillingAddressActionGroup" stepKey="clickEditDefaultBillingAddressAgain"/> |
| 50 | + <actionGroup ref="AdminRemoveRegionFromCustomerAddressInformationActionGroup" stepKey="removeState"/> |
| 51 | + |
| 52 | + <!--Verify state name not visible under address details section--> |
| 53 | + <dontSee userInput="{{updateCustomerFranceAddress.state}}" selector="{{AdminCustomerAddressesDefaultBillingSection.addressDetails}}" stepKey="dontSeeStateInAddress"/> |
| 54 | + |
| 55 | + <!--Log in to Storefront--> |
| 56 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCreateCustomer"> |
| 57 | + <argument name="Customer" value="$createCustomer$"/> |
| 58 | + </actionGroup> |
| 59 | + |
| 60 | + <!--Go to customer address book and click edit default shipping address for storefront--> |
| 61 | + <actionGroup ref="StorefrontGoToCustomerAddressesPageActionGroup" stepKey="goToCustomerAddressBook"/> |
| 62 | + <actionGroup ref="StoreFrontClickEditDefaultShippingAddressActionGroup" stepKey="clickEditDefaultShippingAddressForStorefront"/> |
| 63 | + |
| 64 | + <!--Update the address--> |
| 65 | + <actionGroup ref="FillNewCustomerAddressRequiredFieldsActionGroup" stepKey="fillAddressForm"> |
| 66 | + <argument name="address" value="updateCustomerFranceAddress"/> |
| 67 | + </actionGroup> |
| 68 | + <actionGroup ref="AdminSaveCustomerAddressActionGroup" stepKey="saveAddress"/> |
| 69 | + |
| 70 | + <!--Verify state name in address details section--> |
| 71 | + <see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{updateCustomerFranceAddress.state}}" stepKey="seeAssertCustomerDefaultShippingAddressState"/> |
| 72 | + |
| 73 | + <!--Click on edit link for default shipping address , remove the region and click on save button--> |
| 74 | + <actionGroup ref="StoreFrontClickEditDefaultShippingAddressActionGroup" stepKey="clickEditDefaultShippingAddressForStorefrontAgain"/> |
| 75 | + <actionGroup ref="StorefrontRemoveRegionFromCustomerAddressFormActionGroup" stepKey="fillAddressFormWithoutRegion"/> |
| 76 | + <actionGroup ref="AdminSaveCustomerAddressActionGroup" stepKey="saveAddressAfterRemovingRegion"/> |
| 77 | + <waitForPageLoad stepKey="waitForPageToBeSavedAddressAfterRemovingRegion"/> |
| 78 | + |
| 79 | + <!--Verify state name not visible under address details section--> |
| 80 | + <dontSee userInput="{{updateCustomerFranceAddress.state}}" selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" stepKey="dontSeeAssertCustomerDefaultShippingAddressState"/> |
| 81 | + </test> |
| 82 | +</tests> |
0 commit comments