Skip to content

Commit 6b68063

Browse files
committed
MC-25238: Unstable Test "StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest"
1 parent 4ae0f74 commit 6b68063

4 files changed

+148
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="CartFillEstimateShippingAndTaxActionGroup" extends="CheckoutFillEstimateShippingAndTaxActionGroup">
12+
<arguments>
13+
<argument name="address" defaultValue="US_Address_TX" type="entity"/>
14+
</arguments>
15+
<waitForElementVisible selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" after="openShippingDetails" stepKey="waitForSummarySectionLoad"/>
16+
</actionGroup>
17+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontCheckoutWithDifferentShippingAndBillingAddressAndCreateCustomerAfterCheckoutTest">
11+
<annotations>
12+
<stories value="Checkout"/>
13+
<title value="Verify UK customer checkout with different billing and shipping address and register customer after checkout"/>
14+
<description value="Checkout as UK customer with different shipping/billing address and register checkout method"/>
15+
<severity value="CRITICAL"/>
16+
<testCaseId value="MC-14712"/>
17+
<group value="mtf_migrated"/>
18+
</annotations>
19+
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct">
23+
<field key="price">50.00</field>
24+
</createData>
25+
</before>
26+
<after>
27+
<!-- Sign out Customer from storefront -->
28+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openHomePage"/>
29+
<actionGroup ref="StorefrontSignOutActionGroup" stepKey="customerLogout"/>
30+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
31+
<actionGroup ref="AdminDeleteCustomerInGridActionGroup" stepKey="deleteCustomer">
32+
<argument name="customerEmail" value="UKCustomer.email"/>
33+
</actionGroup>
34+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
35+
</after>
36+
37+
<!--Open Product page in StoreFront and assert product and price range -->
38+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="openProductPageAndVerifyProduct">
39+
<argument name="product" value="$$simpleProduct$$"/>
40+
</actionGroup>
41+
42+
<!--Add product to the cart -->
43+
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addSimpleProductToCart">
44+
<argument name="productQty" value="1"/>
45+
</actionGroup>
46+
47+
<!--Open View and edit -->
48+
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="openCartFromMiniCart"/>
49+
50+
<!-- Fill the Estimate Shipping and Tax section -->
51+
<actionGroup ref="CartFillEstimateShippingAndTaxActionGroup" stepKey="fillEstimateShippingAndTaxFields"/>
52+
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="goToCheckout"/>
53+
<waitForPageLoad stepKey="waitForPageToLoad"/>
54+
55+
<!-- Fill the guest form -->
56+
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillGuestShippingAddress">
57+
<argument name="customer" value="UKCustomer"/>
58+
<argument name="customerAddress" value="updateCustomerUKAddress"/>
59+
</actionGroup>
60+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="goToBillingStep"/>
61+
<waitForElementVisible selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="waitForSameBillingAndShippingAddressCheckboxVisible"/>
62+
<uncheckOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="uncheckSameBillingAndShippingAddress"/>
63+
<conditionalClick selector="{{CheckoutShippingSection.editAddressButton}}" dependentSelector="{{CheckoutShippingSection.editAddressButton}}" visible="true" stepKey="clickEditBillingAddressButton"/>
64+
<waitForLoadingMaskToDisappear stepKey="waitForBillingAddressFormLoad"/>
65+
66+
<!-- Fill Billing Address -->
67+
<actionGroup ref="StorefrontFillBillingAddressActionGroup" stepKey="fillBillingAddressForm"/>
68+
<click selector="{{CheckoutPaymentSection.update}}" stepKey="clickOnUpdateBillingAddressButton"/>
69+
70+
<!--Place order -->
71+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
72+
<seeElement selector="{{StorefrontMinicartSection.emptyMiniCart}}" stepKey="assertEmptyCart" />
73+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumberWithoutLink}}" stepKey="orderId"/>
74+
75+
<!-- Register customer after checkout -->
76+
<actionGroup ref="StorefrontRegisterCustomerAfterCheckoutActionGroup" stepKey="registerCustomer"/>
77+
78+
<!-- Open Order Index Page -->
79+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrdersGrid"/>
80+
81+
<!-- Filter Order using orderId and assert order-->
82+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById">
83+
<argument name="orderId" value="$orderId"/>
84+
</actionGroup>
85+
86+
<click selector="{{AdminOrdersGridSection.viewLink('$orderId')}}" stepKey="openOrderPage"/>
87+
<waitForPageLoad stepKey="waitForOrderPageToLoad"/>
88+
89+
<!-- Assert Grand Total -->
90+
<see selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$55.00" stepKey="seeGrandTotal"/>
91+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderStatus"/>
92+
93+
<!-- Ship the order and assert the status -->
94+
<actionGroup ref="AdminShipThePendingOrderActionGroup" stepKey="shipTheOrder"/>
95+
96+
<!-- Assert order buttons -->
97+
<actionGroup ref="AdminAssertOrderAvailableButtonsActionGroup" stepKey="assertOrderButtons"/>
98+
</test>
99+
</tests>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
-->
88
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10-
<test name="StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest">
10+
<test name="StorefrontCheckoutWithDifferentShippingAndBillingAddressAndRegisterCustomerAfterCheckoutTest" deprecated="Use StorefrontCheckoutWithDifferentShippingAndBillingAddressAndCreateCustomerAfterCheckoutTest instead">
1111
<annotations>
1212
<stories value="Checkout"/>
13-
<title value="Verify UK customer checkout with different billing and shipping address and register customer after checkout"/>
13+
<title value="DEPRECATED. Verify UK customer checkout with different billing and shipping address and register customer after checkout"/>
1414
<description value="Checkout as UK customer with different shipping/billing address and register checkout method"/>
1515
<severity value="CRITICAL"/>
1616
<testCaseId value="MC-14712"/>
1717
<group value="mtf_migrated"/>
18+
<skip>
19+
<issueId value="DEPRECATED">Use StorefrontCheckoutWithDifferentShippingAndBillingAddressAndCreateCustomerAfterCheckoutTest instead</issueId>
20+
</skip>
1821
</annotations>
1922

2023
<before>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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="AdminDeleteCustomerInGridActionGroup" extends="AdminDeleteCustomerActionGroup">
12+
<arguments>
13+
<argument name="customerEmail"/>
14+
</arguments>
15+
16+
<remove keyForRemoval="openFilters"/>
17+
<remove keyForRemoval="fillEmail"/>
18+
<remove keyForRemoval="clickApplyFilters"/>
19+
<remove keyForRemoval="chooseCustomer"/>
20+
<click selector="{{AdminDataGridHeaderSection.filters}}" after="waitForFiltersClear" stepKey="openFiltersSection"/>
21+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="AdminDataGridHeaderSection.clearFilters" visible="true" after="openFiltersSection" stepKey="clearFiltersIfTheyAreSet"/>
22+
<fillField userInput="{{customerEmail}}" selector="{{AdminCustomerFiltersSection.emailInput}}" after="clearFiltersIfTheyAreSet" stepKey="fillEmailFilterField"/>
23+
<click selector="{{AdminCustomerFiltersSection.apply}}" after="fillEmailFilterField" stepKey="applyEmailFilter"/>
24+
<waitForElementVisible selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}" after="applyEmailFilter" stepKey="waitForAppliedFilterLoad"/>
25+
<click selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}" after="waitForAppliedFilterLoad" stepKey="chooseCustomer"/>
26+
</actionGroup>
27+
</actionGroups>

0 commit comments

Comments
 (0)