Skip to content

Commit 3ec635a

Browse files
committed
did necessary changes
1 parent bdda047 commit 3ec635a

File tree

2 files changed

+40
-18
lines changed

2 files changed

+40
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="GuestVerifiesTheShipToDetailsOnStorefrontCheckoutPaymentActionGroup">
12+
<annotations>
13+
<description>Verifies the Shipping the details on storefront checkout payment page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="firstName" type="string" defaultValue="{{CustomerAddressSimple.firstName}}"/>
17+
<argument name="lastName" type="string" defaultValue="{{CustomerAddressSimple.lastName}}"/>
18+
<argument name="street" type="string" defaultValue="{{CustomerAddressSimple.street[0]}}"/>
19+
<argument name="city" type="string" defaultValue="{{CustomerAddressSimple.city}}"/>
20+
<argument name="state" type="string" defaultValue="{{CustomerAddressSimple.state}}"/>
21+
<argument name="postcode" type="string" defaultValue="{{CustomerAddressSimple.postcode}}"/>
22+
<argument name="telephone" type="string" defaultValue="{{CustomerAddressSimple.telephone}}"/>
23+
</arguments>
24+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{firstName}}" stepKey="assertShipToFirstName" />
25+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{lastName}}" stepKey="assertShipToLastName" />
26+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{street}}" stepKey="assertShipToStreet" />
27+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{city}}" stepKey="assertShipToCity" />
28+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{state}}" stepKey="assertShipToState" />
29+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{postcode}}" stepKey="assertShipToPostcode" />
30+
<waitForText selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{telephone}}" stepKey="assertShipToTelephone" />
31+
</actionGroup>
32+
</actionGroups>
33+

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

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,24 @@
3434
<!-- delete simple product -->
3535
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3636
</after>
37-
<!-- Step 1: Go to Storefront as Guest -->
38-
<!-- Step 2: Add simple product to shopping cart -->
39-
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage">
37+
<!-- Go to Storefront as Guest and add product to cart -->
38+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="guestOpenProductPage">
4039
<argument name="product" value="$$createProduct$$"/>
4140
</actionGroup>
4241
<waitForPageLoad stepKey="waitForPageLoadToGetTheStorePageOpen"/>
4342
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addSimpleProductToCartFromStorefront">
4443
<argument name="productName" value="$createProduct.name$"/>
4544
</actionGroup>
4645
<!-- Proceed to Checkout -->
47-
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
48-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
46+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="guestProceedsToCheckout"/>
47+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearPostClickingOnCheckout"/>
4948
<!-- verify shipping screen is opened -->
5049
<waitForElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/>
51-
<!--Fill Shipping Form-->
5250
<!--Filling shipping information and click next-->
5351
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
5452
<argument name="shippingMethod" value="Flat Rate"/>
5553
</actionGroup>
56-
<!--Review & Payments step of checkout is opened-->
57-
<!--Verify Billing address is correct-->
54+
<!--Review & Payments step of checkout is opened where Correct Billing address is verified-->
5855
<actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="verifyShipToInformation">
5956
<argument name="customerVar" value="CustomerEntityOne" />
6057
<argument name="customerAddressVar" value="CustomerAddressSimple" />
@@ -65,13 +62,7 @@
6562
<reloadPage stepKey="refreshPage"/>
6663
<waitForPageLoad stepKey="waitForPageLoad"/>
6764
<!-- Check that "Ship To" block contains correct information -->
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" />
65+
<actionGroup ref="GuestVerifiesTheShipToDetailsOnStorefrontCheckoutPaymentActionGroup" stepKey="assertingShipToInformationOnPaymentPage"/>
7566
<!-- Assert Shipping Method = "Flat Rate" -->
7667
<waitForText userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethodAgain"/>
7768
<!-- click on Edit button next to "Ship To" Text -->
@@ -82,9 +73,7 @@
8273
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
8374
</actionGroup>
8475
<!-- Check that "Ship To" block contains correct information -->
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" />
76+
<actionGroup ref="GuestVerifiesTheShipToDetailsOnStorefrontCheckoutPaymentActionGroup" stepKey="againAssertingShipToInformationOnPaymentPage"/>
8877
<!-- Assert Shipping Method = "Free Shipping" -->
8978
<waitForText userInput="Free Shipping - Free" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertFreeShippingMethod"/>
9079
<!-- click on Edit button next to "Shipping Method" Text -->

0 commit comments

Comments
 (0)