Skip to content

Commit 1f58462

Browse files
Merge branch 'ACQE-6527' into ACQE-6392
2 parents 9618d26 + 752f0a1 commit 1f58462

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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="StorefrontPersistentDataForRegisterCustomerWithPhysicalQuoteTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Checkout via Register Checkout"/>
15+
<title value="Persistent Data for register Customer with physical quote"/>
16+
<description value="One can use Persistent Data for register Customer with physical quote"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4618"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleProduct2" stepKey="createProduct">
23+
<field key="price">10</field>
24+
</createData>
25+
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
26+
<actionGroup ref="CliEnableFreeShippingMethodActionGroup" stepKey="freeShippingMethodsSettingConfig"/>
27+
</before>
28+
<after>
29+
<actionGroup ref="CliDisableFreeShippingMethodActionGroup" stepKey="disableFreeShipping"/>
30+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
31+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
32+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
33+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
34+
</after>
35+
<!-- Login as Customer Login from Customer page -->
36+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/>
37+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
38+
<argument name="Customer" value="$$createCustomer$$" />
39+
</actionGroup>
40+
<!-- Add simple product to cart and go to checkout-->
41+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart">
42+
<argument name="product" value="$$createProduct$$"/>
43+
</actionGroup>
44+
<!-- 2. Go to Shopping Cart -->
45+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartIndexPage"/>
46+
<!-- 3. Open "Estimate Shipping and Tax" section and input data -->
47+
<actionGroup ref="StorefrontCartEstimateShippingAndTaxActionGroup" stepKey="expandEstimateShippingAndTaxSection"/>
48+
<actionGroup ref="StorefrontAssertCartEstimateShippingAndTaxActionGroup" stepKey="assertCartEstimateShippingAddress"/>
49+
<actionGroup ref="StorefrontAssertShippingMethodPresentInCartActionGroup" stepKey="assertShippingMethodFlatRateIsPresentInCart">
50+
<argument name="shippingMethod" value="Flat Rate"/>
51+
</actionGroup>
52+
<actionGroup ref="StorefrontAssertShippingMethodPresentInCartActionGroup" stepKey="assertShippingMethodFreeShippingIsPresentInCart">
53+
<argument name="shippingMethod" value="Free Shipping"/>
54+
</actionGroup>
55+
<!-- 4. Select Flat Rate as shipping -->
56+
<checkOption selector="{{CheckoutCartSummarySection.flatRateShippingMethod}}" stepKey="selectFlatRateShippingMethod"/>
57+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearAfterFlatRateSelection"/>
58+
<waitForText selector="{{CheckoutCartSummarySection.total}}" userInput="15" stepKey="assertOrderTotalField"/>
59+
<!-- 5. Refresh browser page (F5) -->
60+
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
61+
<actionGroup ref="StorefrontAssertCartEstimateShippingAndTaxActionGroup" stepKey="assertCartEstimateShippingAddressAfterReload"/>
62+
<actionGroup ref="StorefrontAssertCartShippingMethodSelectedActionGroup" stepKey="assertFlatRateShippingMethodIsCheckedAfterReload">
63+
<argument name="carrierCode" value="flatrate"/>
64+
<argument name="methodCode" value="flatrate"/>
65+
</actionGroup>
66+
<actionGroup ref="CheckoutFillEstimateShippingAndTaxActionGroup" stepKey="fillUKEstimateShippingAndTaxFields">
67+
<argument name="address" value="updateCustomerUKAddress"/>
68+
</actionGroup>
69+
<waitForLoadingMaskToDisappear stepKey="waitForZipLoadingMaskDisappear"/>
70+
<dontSeeJsError stepKey="verifyThatThereIsNoJSErrors"/>
71+
<!-- 6. Go to Checkout -->
72+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
73+
<actionGroup ref="StorefrontAssertCheckoutShippingMethodSelectedActionGroup" stepKey="assertFlatRateShippingMethodIsCheckedAfterGoingToCheckout">
74+
<argument name="shippingMethod" value="Flat Rate"/>
75+
</actionGroup>
76+
<actionGroup ref="StorefrontClickAddNewAddressButtonFromCheckoutShippingActionGroup" stepKey="clickOnNewAddressButton"/>
77+
<waitForElementVisible selector="{{CheckoutShippingSection.firstName('John')}}" stepKey="assertFirstName"/>
78+
<waitForElementVisible selector="{{CheckoutShippingSection.lastName('Doe')}}" stepKey="assertLastName"/>
79+
<seeOptionIsSelected selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country}}" stepKey="selectedCountryIsUnitedKingdom"/>
80+
<waitForElementVisible selector="{{CheckoutShippingSection.postcode('12345')}}" stepKey="assertUKPostCode"/>
81+
<actionGroup ref="CustomerLoggedInCheckoutFillNewBillingAddressActionGroup" stepKey="fillSwitzerlandAddress">
82+
<argument name="Address" value="Switzerland_Address"/>
83+
</actionGroup>
84+
<!-- Check order summary in checkout -->
85+
<actionGroup ref="StorefrontCheckoutClickSaveAddressButtonActionGroup" stepKey="saveAddress"/>
86+
<!-- Select Free Shipping -->
87+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="setShippingMethodFreeShipping">
88+
<argument name="shippingMethodName" value="Free Shipping"/>
89+
</actionGroup>
90+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="againGoToShoppingCart"/>
91+
<dontSeeJsError stepKey="againVerifyThatThereIsNoJSErrors"/>
92+
<actionGroup ref="AssertStorefrontCheckoutCartEstimateShippingAndTaxAddressActionGroup" stepKey="checkSwitzerlandAddress">
93+
<argument name="country" value="{{Switzerland_Address.country}}"/>
94+
<argument name="state" value="{{Switzerland_Address.state}}"/>
95+
<argument name="postcode" value="{{Switzerland_Address.postcode}}"/>
96+
</actionGroup>
97+
<actionGroup ref="StorefrontAssertCartShippingMethodSelectedActionGroup" stepKey="assertFreeShippingMethodIsCheckedAfterGoingBackToShoppingCart">
98+
<argument name="carrierCode" value="freeshipping"/>
99+
<argument name="methodCode" value="freeshipping"/>
100+
</actionGroup>
101+
</test>
102+
</tests>

0 commit comments

Comments
 (0)