Skip to content

Commit dd86abe

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

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +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"/>
48+
<element name="shippingAddressRequiredField" type="text" selector="//*[@id='shipping-new-address-form']//div[contains(@class, 'field _required') and contains(@name, '{{attribute}}')]" parameterized="true" timeout="30"/>
4949
</section>
5050
</sections>

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,27 @@
2626
</after>
2727
<!--Step 1 Add simple product to the cart -->
2828
<actionGroup ref="StorefrontAddSimpleProductToShoppingCartActionGroup" stepKey="addProductToCart">
29-
<argument name="product" value="$$createSimpleProduct$$"/>
29+
<argument name="product" value="$createSimpleProduct$"/>
3030
</actionGroup>
3131

3232
<!--Step 2 Proceed to Checkout and be on Shipping page -->
3333
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckout"/>
3434

3535
<!--Step 3 Select Country as United Kingdom and Refresh the page -->
36-
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country}}" stepKey="selectCounty"/>
36+
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country_id}}" stepKey="selectCounty"/>
3737
<waitForPageLoad stepKey="waitFormToReload"/>
3838
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
3939
<!-- Assert Selected Country is United States -->
4040
<seeOptionIsSelected selector="{{CheckoutShippingSection.country}}" userInput="{{US_Address_TX.country}}" stepKey="selectedCountryIsUnitedStates"/>
4141

4242
<!--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"/>
43+
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country_id}}" stepKey="selectUnitedKingdomCounty"/>
44+
<waitForPageLoad stepKey="waitFormToReloadAfterSelectCountry"/>
4445
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{UK_Address.street[0]}}" stepKey="enterAddressStreet"/>
4546
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPageAfterAddressIsAdded"/>
4647
<!-- Assert Entered details should be retained and State/Province field should be displayed as an optional field (without * ) -->
4748
<seeOptionIsSelected selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country}}" stepKey="selectedCountryIsUnitedKingdom"/>
4849
<seeInField selector="{{CheckoutShippingSection.street}}" userInput="{{UK_Address.street[0]}}" stepKey="seeAddressStreetUnitedKingdom"/>
49-
<dontSeeElement selector="{{CheckoutShippingSection.regionFieldIsRequired}}" stepKey="assertStateProvinceIsNotRequired"/>
50+
<dontSeeElement selector="{{CheckoutShippingSection.shippingAddressRequiredField('shippingAddress.region_id')}}" stepKey="assertStateProvinceIsNotRequired"/>
5051
</test>
5152
</tests>

0 commit comments

Comments
 (0)