Skip to content

Commit bdda047

Browse files
committed
ACQE-3955 : did required changes
1 parent af0afa7 commit bdda047

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

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

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<testCaseId value="AC-4628"/>
1919
</annotations>
2020
<before>
21-
<!-- Enable free shipping -->
22-
<createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/>
21+
<!-- Enable free shipping -->
22+
<createData entity="FreeShippingMethodsSettingConfig" stepKey="enableFreeShippingConfig"/>
2323
<!-- create category -->
2424
<createData entity="_defaultCategory" stepKey="createCategory"/>
2525
<!-- create simple product -->
@@ -28,68 +28,70 @@
2828
</createData>
2929
</before>
3030
<after>
31+
<createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/>
3132
<!-- delete category -->
3233
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
3334
<!-- delete simple product -->
3435
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3536
</after>
3637
<!-- Step 1: Go to Storefront as Guest -->
3738
<!-- Step 2: Add simple product to shopping cart -->
38-
<amOnPage url="{{StorefrontProductPage.url($createProduct.custom_attributes[url_key]$)}}" stepKey="amOnSimpleProductPage"/>
39-
<waitForPageLoad stepKey="waitForPageLoadToGetTheStorePageOpenAgain"/>
40-
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="cartAddSimpleProductToCart">
39+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage">
40+
<argument name="product" value="$$createProduct$$"/>
41+
</actionGroup>
42+
<waitForPageLoad stepKey="waitForPageLoadToGetTheStorePageOpen"/>
43+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addSimpleProductToCartFromStorefront">
4144
<argument name="productName" value="$createProduct.name$"/>
4245
</actionGroup>
4346
<!-- Proceed to Checkout -->
44-
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickToOpenCard"/>
45-
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickToProceedToCheckout"/>
46-
<waitForPageLoad stepKey="waitForTheFormIsOpened"/>
47+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
48+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
4749
<!-- verify shipping screen is opened -->
48-
<seeElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/>
50+
<waitForElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/>
4951
<!--Fill Shipping Form-->
5052
<!--Filling shipping information and click next-->
5153
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
5254
<argument name="shippingMethod" value="Flat Rate"/>
5355
</actionGroup>
5456
<!--Review & Payments step of checkout is opened-->
5557
<!--Verify Billing address is correct-->
56-
<actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="checkoutCheckShipToInformation">
58+
<actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="verifyShipToInformation">
5759
<argument name="customerVar" value="CustomerEntityOne" />
5860
<argument name="customerAddressVar" value="CustomerAddressSimple" />
5961
</actionGroup>
6062
<!-- Assert Shipping Method = "Flat Rate" -->
61-
<see userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethod"/>
63+
<waitForText userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethod"/>
6264
<!-- Reload Page and wait for page to get reload -->
6365
<reloadPage stepKey="refreshPage"/>
6466
<waitForPageLoad stepKey="waitForPageLoad"/>
6567
<!-- Check that "Ship To" block contains correct information -->
66-
<waitForElementVisible selector="{{CheckoutPaymentSection.shipToInformation}}" stepKey="waitForShippingInformationToAppear"/>
67-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.firstName}}" stepKey="seeShipToFirstName" />
68-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.lastName}}" stepKey="seeShipToLastName" />
69-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="seeShipToStreet" />
70-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="seeShipToCity" />
71-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.state}}" stepKey="seeShipToState" />
72-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="seeShipToPostcode" />
73-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="seeShipToTelephone" />
68+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.firstName}}" stepKey="assertShipToFirstName" />
69+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.lastName}}" stepKey="assertShipToLastName" />
70+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="assertShipToStreet" />
71+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="assertShipToCity" />
72+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.state}}" stepKey="assertShipToState" />
73+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="assertShipToPostcode" />
74+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="assertShipToTelephone" />
7475
<!-- Assert Shipping Method = "Flat Rate" -->
75-
<see userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethodAgain"/>
76+
<waitForText userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethodAgain"/>
7677
<!-- click on Edit button next to "Ship To" Text -->
77-
<click selector="{{CheckoutPaymentSection.editShipToInformation}}" stepKey="clickOnEditButton"/>
78+
<waitForElementVisible selector="{{CheckoutPaymentSection.editShipToAddress}}" stepKey="waitForEditButtonToBeVisible"/>
79+
<click selector="{{CheckoutPaymentSection.editShipToAddress}}" stepKey="clickOnEditButton"/>
7880
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSectionAgain">
7981
<argument name="customerVar" value="CustomerEntityOne"/>
8082
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
8183
</actionGroup>
8284
<!-- Check that "Ship To" block contains correct information -->
83-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="seeShipToFirstNameAgain" />
84-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="seeShipToLastNameAgain" />
85-
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="seeShipToCityAgain" />
85+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="assertShipToFirstNameAgain" />
86+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="assertShipToLastNameAgain" />
87+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="assertShipToCityAgain" />
8688
<!-- Assert Shipping Method = "Free Shipping" -->
87-
<see userInput="Free Shipping - Free" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertFreeShippingMethod"/>
89+
<waitForText userInput="Free Shipping - Free" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertFreeShippingMethod"/>
8890
<!-- click on Edit button next to "Shipping Method" Text -->
89-
<click selector="{{CheckoutPaymentSection.editShipMethodInformation}}" stepKey="clickOnEditShippingMethodButton"/>
91+
<waitForElementVisible selector="{{CheckoutPaymentSection.editShippingMethod}}" stepKey="waitForEditButtonToVisible"/>
92+
<click selector="{{CheckoutPaymentSection.editShippingMethod}}" stepKey="clickOnEditShippingMethodButton"/>
9093
<!-- Assert that it has scrolled to Shipping Method text -->
91-
<waitForElementVisible selector="{{CheckoutPaymentSection.shippingMethodTitle}}" stepKey="waitForShippingMethodTitle"/>
9294
<scrollTo selector="{{CheckoutPaymentSection.shippingMethodTitle}}" stepKey="scrollToShippingMethodTitle"/>
93-
<see selector="{{CheckoutPaymentSection.shippingMethodTitle}}" userInput="Shipping Methods" stepKey="seeShippingMethodTitle"/>
95+
<waitForText selector="{{CheckoutPaymentSection.shippingMethodTitle}}" userInput="Shipping Methods" stepKey="assertShippingMethodTitle"/>
9496
</test>
9597
</tests>

0 commit comments

Comments
 (0)