Skip to content

Commit a5732e6

Browse files
committed
MC-40197: [JetTeam] Unskip AddressStateFieldForUKCustomerRemainOptionAfterRefreshTest
1 parent 427f9bf commit a5732e6

File tree

4 files changed

+56
-3
lines changed

4 files changed

+56
-3
lines changed

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@
4545
<element name="addressFieldValidationError" type="text" selector="div.address div.field .field-error"/>
4646
<element name="textFieldAttrRequireMessage" type="text" selector="//input[@name='custom_attributes[{{attribute}}]']/ancestor::div[contains(@class, 'control')]/div/span" parameterized="true" timeout="30"/>
4747
<element name="textFieldAttribute" type="input" selector="[name*='custom_attributes[{{attribute}}]']" parameterized="true" timeout="30"/>
48+
<element name="regionFieldIsRequired" type="text" selector="#shipping-new-address-form>div[class='field _required'][name='shippingAddress.region_id']" timeout="30"/>
4849
</section>
4950
</sections>

app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldForUKCustomerRemainOptionAfterRefreshTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AddressStateFieldForUKCustomerRemainOptionAfterRefreshTest">
11+
<test name="AddressStateFieldForUKCustomerRemainOptionAfterRefreshTest" deprecated="Use StorefrontAddressStateFieldForUKCustomerRemainOptionAfterRefreshTest instead">
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="Guest checkout"/>
15-
<title value="Address State Field For UK Customers Remain Option even After Browser Refresh"/>
15+
<title value="DEPRECATED. Address State Field For UK Customers Remain Option even After Browser Refresh"/>
1616
<description value="Address State Field For UK Customers Remain Option even After Browser Refresh"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-93329"/>
1919
<group value="checkout"/>
2020
<skip>
21-
<issueId value="MAGETWO-93726"/>
21+
<issueId value="DEPRECATED">Use StorefrontAddressStateFieldForUKCustomerRemainOptionAfterRefreshTest instead</issueId>
2222
</skip>
2323
</annotations>
2424
<before>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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>

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
</array>
160160
<data key="city">London</data>
161161
<data key="country_id">GB</data>
162+
<data key="country">United Kingdom</data>
162163
<data key="telephone">512-345-6789</data>
163164
<data key="province">JS</data>
164165
</entity>

0 commit comments

Comments
 (0)