|
11 | 11 | <test name="VerifyCustomerAddressRegionFieldTest">
|
12 | 12 | <annotations>
|
13 | 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."/> |
| 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 | 17 | <severity value="AVERAGE"/>
|
18 | 18 | <testCaseId value="AC-8302"/>
|
19 | 19 | <useCaseId value="ACP2E-1609"/>
|
20 | 20 | <group value="customer"/>
|
21 | 21 | </annotations>
|
22 | 22 |
|
23 | 23 | <before>
|
24 |
| - <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="firstCustomer"/> |
| 24 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
25 | 25 | <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
|
26 | 26 | </before>
|
27 | 27 |
|
28 | 28 | <after>
|
29 |
| - <deleteData createDataKey="firstCustomer" stepKey="deleteFirstCustomer"/> |
| 29 | + <deleteData createDataKey="createCustomer" stepKey="deleteCreateCustomer"/> |
30 | 30 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
31 | 31 | </after>
|
32 | 32 |
|
33 |
| - <!--Open customer grid page,select created customer and click edit mode--> |
| 33 | + <!--Open customer grid page and Navigate to customer edit page addresses tab for created customer--> |
34 | 34 | <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="openCustomersGridPage"/>
|
35 |
| - <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPageWithAddresses"> |
36 |
| - <argument name="customer" value="$$firstCustomer$$"/> |
| 35 | + <actionGroup ref="AdminNavigateCustomerEditPageAddressesTabActionGroup" stepKey="openEditCustomerPageWithAddresses"> |
| 36 | + <argument name="customerId" value="$createCustomer.id$"/> |
37 | 37 | </actionGroup>
|
38 | 38 |
|
39 |
| - <!--Select Addresses tab click on Edit link for Default Billing Address --> |
40 |
| - <click selector="{{AdminEditCustomerInformationSection.addresses}}" stepKey="openAddressesTabOfFirstCustomer"/> |
41 |
| - <waitForPageLoad stepKey="waitForAddressesOfFirstCustomer"/> |
42 |
| - <click selector="{{AdminCustomerAddressesDefaultBillingSection.editButton}}" stepKey="clickEditDefaultBillingAddress"/> |
43 |
| - <waitForPageLoad stepKey="waitForCustomerAddressAddUpdateFormLoad"/> |
44 |
| - |
45 |
| - <!-- Select Country = Finland And Region =Ahvenanmaa , Click on Save Button--> |
46 |
| - <click selector="{{AdminCustomerAddressesSection.country}}" stepKey="clickCountryToOpenListOfCountries"/> |
47 |
| - <click selector="{{AdminCustomerAddressesSection.countryId(Finland_Address.country_id)}}" stepKey="fillCountry"/> |
48 |
| - <click selector="{{AdminCustomerAddressesSection.state}}" stepKey="clickRegionToOpenListOfRegions"/> |
49 |
| - <click selector="{{AdminCustomerAddressesSection.regionId(Finland_Address.state)}}" stepKey="fillRegion"/> |
50 |
| - <click selector="{{AdminCustomerAddressesSection.saveAddress}}" stepKey="clickSaveCustomer"/> |
51 |
| - <waitForPageLoad stepKey="waitForPageToBeSave"/> |
| 39 | + <!--Click on edit default billing address and update the address--> |
| 40 | + <actionGroup ref="AdminClickEditLinkForDefaultBillingAddressActionGroup" stepKey="clickEditDefaultBillingAddress"/> |
| 41 | + <actionGroup ref="AdminSaveCustomerAddressInformationActionGroup" stepKey="fillAndSaveCustomerAddressInformation"> |
| 42 | + <argument name="address" value="updateCustomerFranceAddress"/> |
| 43 | + </actionGroup> |
52 | 44 |
|
53 | 45 | <!--Verify state name in address details section-->
|
54 |
| - <see selector="{{AdminCustomerAddressesDefaultBillingSection.addressDetails}}" userInput="{{Finland_Address.state}}" stepKey="SeeStateInAddress"/> |
| 46 | + <see selector="{{AdminCustomerAddressesDefaultBillingSection.addressDetails}}" userInput="{{updateCustomerFranceAddress.state}}" stepKey="seeStateInAddress"/> |
55 | 47 |
|
56 |
| - <!-- Click on edit link for default billing address , deselect region and click on save button--> |
57 |
| - <click selector="{{AdminCustomerAddressesDefaultBillingSection.editButton}}" stepKey="clickEditDefaultBillingAddressAgain"/> |
58 |
| - <waitForPageLoad stepKey="waitForCustomerAddressAddUpdateFormLoad2"/> |
59 |
| - <selectOption selector="{{AdminCustomerAddressesSection.state}}" userInput="Please select a region, state or province." stepKey="selectState"/> |
60 |
| - <click selector="{{AdminCustomerAddressesSection.saveAddress}}" stepKey="clickSaveCustomerAfterDeselectRegion"/> |
61 |
| - <waitForPageLoad stepKey="waitForPageToBeSaved"/> |
| 48 | + <!--Click on edit link for default billing address , remove the region--> |
| 49 | + <actionGroup ref="AdminClickEditLinkForDefaultBillingAddressActionGroup" stepKey="clickEditDefaultBillingAddressAgain"/> |
| 50 | + <actionGroup ref="AdminRemoveRegionFromCustomerAddressInformationActionGroup" stepKey="removeState"/> |
62 | 51 |
|
63 | 52 | <!--Verify state name not visible under address details section-->
|
64 |
| - <dontSee userInput="{{Finland_Address.state}}" selector="{{AdminCustomerAddressesDefaultBillingSection.addressDetails}}" stepKey="dontSeeStateInAddress"/> |
65 |
| - |
66 |
| - <!--Logout from admin--> |
67 |
| - <actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="clearFilters"/> |
68 |
| - <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 53 | + <dontSee userInput="{{updateCustomerFranceAddress.state}}" selector="{{AdminCustomerAddressesDefaultBillingSection.addressDetails}}" stepKey="dontSeeStateInAddress"/> |
69 | 54 |
|
70 |
| - <!--Log in to Storefront as First Customer --> |
71 |
| - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginFirstCustomer"> |
72 |
| - <argument name="Customer" value="$$firstCustomer$$"/> |
| 55 | + <!--Log in to Storefront--> |
| 56 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCreateCustomer"> |
| 57 | + <argument name="Customer" value="$createCustomer$"/> |
73 | 58 | </actionGroup>
|
74 | 59 |
|
75 |
| - <!--Go to customer address book and click edit default billing address for storefront --> |
| 60 | + <!--Go to customer address book and click edit default shipping address for storefront--> |
76 | 61 | <actionGroup ref="StorefrontGoToCustomerAddressesPageActionGroup" stepKey="goToCustomerAddressBook"/>
|
77 |
| - <click stepKey="ClickEditDefaultBillingAddressForStorefront" selector="{{StorefrontCustomerAddressesSection.editDefaultBillingAddress}}"/> |
78 |
| - <waitForPageLoad stepKey="waitForStorefrontSignInPageLoad"/> |
| 62 | + <actionGroup ref="StoreFrontClickEditDefaultShippingAddressActionGroup" stepKey="clickEditDefaultShippingAddressForStorefront"/> |
79 | 63 |
|
80 |
| - <!-- Select Region =Ahvenanmaa and click on save button--> |
81 |
| - <selectOption selector="{{StorefrontCustomerAddressFormSection.state}}" userInput="{{Finland_Address.state}}" stepKey="selectStateForStorefront"/> |
| 64 | + <!--Update the address--> |
| 65 | + <actionGroup ref="FillNewCustomerAddressRequiredFieldsActionGroup" stepKey="fillAddressForm"> |
| 66 | + <argument name="address" value="updateCustomerFranceAddress"/> |
| 67 | + </actionGroup> |
82 | 68 | <actionGroup ref="AdminSaveCustomerAddressActionGroup" stepKey="saveAddress"/>
|
83 | 69 |
|
84 | 70 | <!--Verify state name in address details section-->
|
85 |
| - <see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{Finland_Address.state}}" stepKey="seeAssertCustomerDefaultShippingAddressState"/> |
| 71 | + <see selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" userInput="{{updateCustomerFranceAddress.state}}" stepKey="seeAssertCustomerDefaultShippingAddressState"/> |
86 | 72 |
|
87 |
| - <!-- Click on edit link for default billing address , deselect region and click on save button--> |
88 |
| - <click stepKey="ClickEditDefaultBillingAddressForStorefrontAgain" selector="{{StorefrontCustomerAddressesSection.editDefaultBillingAddress}}"/> |
89 |
| - <waitForPageLoad stepKey="waitForStorefrontSignInPageLoad2"/> |
90 |
| - <selectOption selector="{{StorefrontCustomerAddressFormSection.state}}" userInput="Please select a region, state or province." stepKey="deselectStateForStorefront"/> |
91 |
| - <actionGroup ref="AdminSaveCustomerAddressActionGroup" stepKey="saveAddressAfterDeselectRegion"/> |
| 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"/> |
92 | 78 |
|
93 | 79 | <!--Verify state name not visible under address details section-->
|
94 |
| - <dontSee userInput="{{Finland_Address.state}}" selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" stepKey="dontSeeAssertCustomerDefaultShippingAddressState"/> |
95 |
| - |
| 80 | + <dontSee userInput="{{updateCustomerFranceAddress.state}}" selector="{{StorefrontCustomerAddressesSection.defaultShippingAddress}}" stepKey="dontSeeAssertCustomerDefaultShippingAddressState"/> |
96 | 81 | </test>
|
97 | 82 | </tests>
|
0 commit comments