Skip to content

Commit 9734724

Browse files
ManjushaManjusha
authored andcommitted
Merge branch 'ACQE-3955' into functional-testing-mainline-deployment
2 parents 99ac99b + 5d7bc34 commit 9734724

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
<element name="ProductOptionsActiveByProductItemName" type="text" selector="//div[@class='product-item-details']//strong[@class='product-item-name'][text()='{{var1}}']//ancestor::div[@class='product-item-details']//div[@class='product options active']" parameterized="true" />
4949
<element name="ProductOptionLinkActiveByProductItemName" type="text" selector="//div[@class='product-item-details']//strong[@class='product-item-name'][text()='{{var1}}']//ancestor::div[@class='product-item-details']//div[@class='product options active']//a[text() = '{{var2}}']" parameterized="true" />
5050
<element name="shipToInformation" type="text" selector="//div[@class='ship-to']//div[@class='shipping-information-content']" />
51+
<element name="editShipToInformation" type="button" selector="//div[@class='ship-to']//button[@class='action action-edit']"/>
52+
<element name="shippingMethodTitle" type="text" selector="//div[@class='checkout-shipping-method']//div[@class='step-title']"/>
5153
<element name="shippingMethodInformation" type="text" selector="//div[@class='ship-via']//div[@class='shipping-information-content']" />
54+
<element name="editShipMethodInformation" type="button" selector="//div[@class='ship-via']//button[@class='action action-edit']"/>
5255
<element name="shippingInformationSection" type="text" selector=".ship-to .shipping-information-content" />
5356
<element name="paymentMethodTitle" type="text" selector=".payment-method-title span" />
5457
<element name="productOptionsByProductItemPrice" type="text" selector="//div[@class='product-item-inner']//div[@class='subtotal']//span[@class='price'][contains(.,'{{price}}')]//ancestor::div[@class='product-item-details']//div[@class='product options']" parameterized="true"/>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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="StorefrontVerifyShipToShipMethodContainsSameDataTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Guest checkout"/>
15+
<title value="Ship To and Shipping Method blocks on Checkout contain actual information according to inputed data"/>
16+
<description value="Ship To and Shipping Method blocks on Checkout contain actual information according to inputed data"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4628"/>
19+
</annotations>
20+
<before>
21+
<!-- Enable free shipping -->
22+
<createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/>
23+
<!-- create category -->
24+
<createData entity="_defaultCategory" stepKey="createCategory"/>
25+
<!-- create simple product -->
26+
<createData entity="ApiSimpleProduct" stepKey="createProduct">
27+
<requiredEntity createDataKey="createCategory"/>
28+
</createData>
29+
</before>
30+
<after>
31+
<!-- delete category -->
32+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
33+
<!-- delete simple product -->
34+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
35+
</after>
36+
<!-- Step 1: Go to Storefront as Guest -->
37+
<!-- Step 2: Add simple product to shopping cart -->
38+
<amOnPage url="{{StorefrontProductPage.url($createProduct.custom_attributes[url_key]$)}}" stepKey="amOnSimpleProductPage"/>
39+
<waitForPageLoad stepKey="waitForPageLoad2"/>
40+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="cartAddSimpleProductToCart">
41+
<argument name="productName" value="$createProduct.name$"/>
42+
</actionGroup>
43+
<!-- Proceed to Checkout -->
44+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickToOpenCard"/>
45+
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickToProceedToCheckout"/>
46+
<waitForPageLoad stepKey="waitForTheFormIsOpened"/>
47+
<!-- verify shipping screen is opened -->
48+
<seeElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/>
49+
<!--Fill Shipping Form-->
50+
<!--Filling shipping information and click next-->
51+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
52+
<argument name="shippingMethod" value="Flat Rate"/>
53+
</actionGroup>
54+
<!--Review & Payments step of checkout is opened-->
55+
<!--Verify Billing address is correct-->
56+
<actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="checkoutCheckShipToInformation">
57+
<argument name="customerVar" value="CustomerEntityOne" />
58+
<argument name="customerAddressVar" value="CustomerAddressSimple" />
59+
</actionGroup>
60+
<!-- Assert Shipping Method = "Flat Rate" -->
61+
<see userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethod"/>
62+
<!-- Reload Page and wait for page to get reload -->
63+
<reloadPage stepKey="refreshPage"/>
64+
<waitForPageLoad stepKey="waitForPageLoad"/>
65+
<!-- Check that "Ship To" block contains correct information -->
66+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.firstName}}" stepKey="seeShipToFirstName" />
67+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.lastName}}" stepKey="seeShipToLastName" />
68+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="seeShipToStreet" />
69+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="seeShipToCity" />
70+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.state}}" stepKey="seeShipToState" />
71+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="seeShipToPostcode" />
72+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="seeShipToTelephone" />
73+
<!-- Assert Shipping Method = "Flat Rate" -->
74+
<see userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethodAgain"/>
75+
<!-- click on Edit button next to "Ship To" Text -->
76+
<click selector="{{CheckoutPaymentSection.editShipToInformation}}" stepKey="clickOnEditButton"/>
77+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSectionAgain">
78+
<argument name="customerVar" value="CustomerEntityOne"/>
79+
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
80+
</actionGroup>
81+
<!-- Check that "Ship To" block contains correct information -->
82+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="seeShipToFirstNameAgain" />
83+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="seeShipToLastNameAgain" />
84+
<see selector="{{CheckoutPaymentSection.shipToInformation}}" userInput="{{CustomerAddressSimple.city}}" stepKey="seeShipToCityAgain" />
85+
<!-- Assert Shipping Method = "Free Shipping" -->
86+
<see userInput="Free Shipping - Free" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertFreeShippingMethod"/>
87+
<!-- click on Edit button next to "Shipping Method" Text -->
88+
<click selector="{{CheckoutPaymentSection.editShipMethodInformation}}" stepKey="clickOnEditShippingMethodButton"/>
89+
<!-- Assert that it has scrolled to Shipping Method text -->
90+
<scrollTo selector="{{CheckoutPaymentSection.shippingMethodTitle}}}" stepKey="scrollToShippingMethodTitle"/>
91+
<see selector="{{CheckoutPaymentSection.shippingMethodTitle}}" userInput="Shipping Methods" stepKey="seeShippingMethodTitle"/>
92+
</test>
93+
</tests>

0 commit comments

Comments
 (0)