|
| 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="StorefrontAddressStateFieldForUKCustomerRemainOptionAfterRefreshTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="Guest checkout"/> |
| 15 | + <title value="Address State Field For UK Customers Remain Option even After Browser Refresh"/> |
| 16 | + <description value="Address State Field For UK Customers Remain Option even After Browser Refresh"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-25694"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="simpleProductWithoutCategory" stepKey="createSimpleProduct"/> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
| 26 | + </after> |
| 27 | + <!--Step 1 Add simple product to the cart --> |
| 28 | + <actionGroup ref="StorefrontAddSimpleProductToShoppingCartActionGroup" stepKey="addProductToCart"> |
| 29 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 30 | + </actionGroup> |
| 31 | + |
| 32 | + <!--Step 2 Proceed to Checkout and be on Shipping page --> |
| 33 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckout"/> |
| 34 | + |
| 35 | + <!--Step 3 Select Country as United Kingdom and Refresh the page --> |
| 36 | + <selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country}}" stepKey="selectCounty"/> |
| 37 | + <waitForPageLoad stepKey="waitFormToReload"/> |
| 38 | + <actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/> |
| 39 | + <!-- Assert Selected Country is United States --> |
| 40 | + <seeOptionIsSelected selector="{{CheckoutShippingSection.country}}" userInput="{{US_Address_TX.country}}" stepKey="selectedCountryIsUnitedStates"/> |
| 41 | + |
| 42 | + <!--Step 4 Select Country as United Kingdom, select address street and Refresh the page--> |
| 43 | + <selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country}}" stepKey="selectUnitedKingdomCounty"/> |
| 44 | + <fillField selector="{{CheckoutShippingSection.street}}" userInput="{{UK_Address.street[0]}}" stepKey="enterAddressStreet"/> |
| 45 | + <actionGroup ref="ReloadPageActionGroup" stepKey="refreshPageAfterAddressIsAdded"/> |
| 46 | + <!-- Assert Entered details should be retained and State/Province field should be displayed as an optional field (without * ) --> |
| 47 | + <seeOptionIsSelected selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country}}" stepKey="selectedCountryIsUnitedKingdom"/> |
| 48 | + <seeInField selector="{{CheckoutShippingSection.street}}" userInput="{{UK_Address.street[0]}}" stepKey="seeAddressStreetUnitedKingdom"/> |
| 49 | + <dontSeeElement selector="{{CheckoutShippingSection.regionFieldIsRequired}}" stepKey="assertStateProvinceIsNotRequired"/> |
| 50 | + </test> |
| 51 | +</tests> |
0 commit comments