Skip to content

Commit a35f694

Browse files
authored
Merge pull request #145 from magento-pangolin/MC-12599
MC-12599
2 parents 15277c0 + a3223ed commit a35f694

16 files changed

+168
-26
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="AdminCheckConfigsChangesAreNotAffectedStartedCheckoutProcessTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Changes in configs are not affecting checkout process"/>
15+
<title value="Admin check configs changes are not affected started checkout process test"/>
16+
<description value="Changes in admin for shipping rates are not affecting checkout process that has been started"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-12599"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<!-- Create simple product -->
23+
<createData entity="SimpleProduct2" stepKey="createProduct"/>
24+
25+
<!-- Enable free shipping method -->
26+
<magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/>
27+
28+
<!-- Disable flat rate method -->
29+
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
30+
</before>
31+
<after>
32+
<!-- Roll back configuration -->
33+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
34+
<magentoCLI command="config:set {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/>
35+
36+
<!-- Delete simple product -->
37+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
38+
39+
<!-- Log out -->
40+
<actionGroup ref="logout" stepKey="logout"/>
41+
</after>
42+
43+
<!-- Add product to cart -->
44+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage">
45+
<argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/>
46+
</actionGroup>
47+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
48+
<argument name="product" value="$$createProduct$$"/>
49+
<argument name="productCount" value="1"/>
50+
</actionGroup>
51+
52+
<!-- Proceed to Checkout from mini shopping cart -->
53+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckout"/>
54+
55+
<!-- Fill all required fields -->
56+
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillNewShippingAddress">
57+
<argument name="customer" value="Simple_Customer_Without_Address" />
58+
<argument name="address" value="US_Address_TX"/>
59+
</actionGroup>
60+
61+
<!-- Assert Free Shipping checkbox -->
62+
<seeCheckboxIsChecked selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="freeShippingMethodCheckboxIsChecked"/>
63+
64+
<!-- Click Next button -->
65+
<click selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="clickNext"/>
66+
<waitForPageLoad stepKey="waitForShipmentPageLoad"/>
67+
68+
<!-- Payment step is opened -->
69+
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/>
70+
71+
<!-- Order Summary block contains information about shipping -->
72+
<actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="guestCheckoutCheckShippingMethod">
73+
<argument name="shippingMethod" value="freeTitleDefault.value"/>
74+
</actionGroup>
75+
76+
<!-- Open new browser's window and login as Admin -->
77+
<openNewTab stepKey="openNewTab"/>
78+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
79+
80+
<!-- Go to Store > Configuration > Sales > Shipping Methods -->
81+
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/>
82+
83+
<!-- Enable "Flat Rate" -->
84+
<actionGroup ref="AdminChangeFlatRateShippingMethodStatusActionGroup" stepKey="enableFlatRateShippingStatus"/>
85+
86+
<!-- Flush cache -->
87+
<magentoCLI command="cache:flush" stepKey="cacheFlush"/>
88+
89+
<!-- Back to the Checkout and refresh the page -->
90+
<switchToPreviousTab stepKey="switchToPreviousTab"/>
91+
<reloadPage stepKey="refreshPage"/>
92+
<waitForPageLoad stepKey="waitPageReload"/>
93+
94+
<!-- Payment step is opened after refreshing -->
95+
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSection"/>
96+
97+
<!-- Order Summary block contains information about free shipping -->
98+
<actionGroup ref="CheckShippingMethodInCheckoutActionGroup" stepKey="guestCheckoutCheckFreeShippingMethod">
99+
<argument name="shippingMethod" value="freeTitleDefault.value"/>
100+
</actionGroup>
101+
</test>
102+
</tests>

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@
1515
<testCaseId value="MC-14715"/>
1616
<severity value="CRITICAL"/>
1717
<group value="mtf_migrated"/>
18-
<skip>
19-
<issueId value="MC-16684"/>
20-
</skip>
2118
</annotations>
2219

2320
<before>
24-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2522
<createData entity="SimpleSubCategory" stepKey="createSubCategory"/>
2623
<!--Create simple product-->
2724
<createData entity="SimpleProduct2" stepKey="simpleProduct1">

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515
<testCaseId value="MC-14719"/>
1616
<severity value="CRITICAL"/>
1717
<group value="mtf_migrated"/>
18-
<skip>
19-
<issueId value="MC-16684"/>
20-
</skip>
2118
</annotations>
2219

2320
<before>
2421
<magentoCLI stepKey="disableShoppingCartSidebar" command="config:set checkout/sidebar/display 0"/>
25-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
22+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2623
<createData entity="SimpleSubCategory" stepKey="createSubCategory"/>
2724

2825
<!--Create simple products-->

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
<testCaseId value="MC-14716"/>
1616
<severity value="CRITICAL"/>
1717
<group value="mtf_migrated"/>
18-
<skip>
19-
<issueId value="MC-16684"/>
20-
</skip>
2118
</annotations>
2219

2320
<before>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2422
<!-- Create Default Category -->
2523
<createData entity="_defaultCategory" stepKey="createCategory"/>
2624

@@ -112,9 +110,9 @@
112110
<magentoCLI command="cache:flush" stepKey="flushCache"/>
113111
</before>
114112
<after>
115-
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteSimpleProduct1"/>
116-
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteSimpleProduct2"/>
117-
<deleteData createDataKey="createConfigChildProduct3" stepKey="deleteSimpleProduct3"/>
113+
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteSimpleProduct1"/>
114+
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteSimpleProduct2"/>
115+
<deleteData createDataKey="createConfigChildProduct3" stepKey="deleteSimpleProduct3"/>
118116
<deleteData createDataKey="createConfigProduct" stepKey="deleteProduct"/>
119117
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
120118
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</annotations>
1919

2020
<before>
21-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2222
<createData entity="ApiDownloadableProduct" stepKey="createDownloadableProduct"/>
2323
<createData entity="downloadableLink1" stepKey="addDownloadableLink1">
2424
<requiredEntity createDataKey="createDownloadableProduct"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</annotations>
1919

2020
<before>
21-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2222
<!--Create Grouped product with three simple product -->
2323
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2">
2424
<field key="price">100.00</field>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</annotations>
1919

2020
<before>
21-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2222
<createData entity="SimpleSubCategory" stepKey="createSubCategory"/>
2323
<!--Create simple product-->
2424
<createData entity="SimpleProduct2" stepKey="simpleProduct1">

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@
1515
<testCaseId value="MC-14728"/>
1616
<severity value="CRITICAL"/>
1717
<group value="mtf_migrated"/>
18-
<skip>
19-
<issueId value="MC-16684"/>
20-
</skip>
2118
</annotations>
2219

2320
<before>
24-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2522
<createData entity="SimpleSubCategory" stepKey="createSubCategory"/>
2623
<!--Create simple product-->
2724
<createData entity="SimpleProduct2" stepKey="simpleProduct1">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</annotations>
1919

2020
<before>
21-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2222
<!--Create simple product-->
2323
<createData entity="SimpleProduct2" stepKey="simpleProduct1">
2424
<field key="price">10.00</field>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</annotations>
1919

2020
<before>
21-
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/>
21+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2222
<!--Create simple product-->
2323
<createData entity="SimpleProduct2" stepKey="simpleProduct1">
2424
<field key="price">10.00</field>

0 commit comments

Comments
 (0)