Skip to content

Commit 45c6c73

Browse files
committed
Merge branch 'MC-23908' into 2.4-develop-sidecar-pr2
2 parents b8550c2 + f0bdf49 commit 45c6c73

10 files changed

+215
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<element name="shippingMethodLabel" type="text" selector="#co-shipping-method-form dl dt span"/>
3535
<element name="methodName" type="text" selector="#co-shipping-method-form label"/>
3636
<element name="shippingPrice" type="text" selector="#co-shipping-method-form span .price"/>
37-
<element name="shippingMethodElementId" type="radio" selector="#s_method_{{carrierCode}}_{{methodCode}}" parameterized="true"/>
37+
<element name="shippingMethodElementId" type="radio" selector="#s_method_{{carrierCode}}_{{methodCode}}" parameterized="true" timeout="30"/>
3838
<element name="estimateShippingAndTaxForm" type="block" selector="#shipping-zip-form"/>
3939
</section>
4040
</sections>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
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="StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest">
10+
<test name="StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest" deprecated="Use StorefrontVerifyGuestCheckoutUsingFreeShippingAndTaxesTest">
1111
<annotations>
1212
<stories value="Checkout"/>
13-
<title value="Verify guest checkout using free shipping and tax variations"/>
13+
<title value="DEPRECATED. Verify guest checkout using free shipping and tax variations"/>
1414
<description value="Verify guest checkout using free shipping and tax variations"/>
1515
<severity value="CRITICAL"/>
1616
<testCaseId value="MC-14709"/>
1717
<group value="mtf_migrated"/>
1818
<skip>
19-
<issueId value="MC-18802"/>
19+
<issueId value="DEPRECATED">Use StorefrontVerifyGuestCheckoutUsingFreeShippingAndTaxesTest</issueId>
2020
</skip>
2121
</annotations>
2222

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
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="StorefrontVerifyGuestCheckoutUsingFreeShippingAndTaxesTest">
11+
<annotations>
12+
<features value="Checkout"/>
13+
<stories value="Checkout via Guest Checkout"/>
14+
<title value="Verify guest checkout using free shipping and tax variations"/>
15+
<description value="Verify guest checkout using free shipping and tax variations"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-28285"/>
18+
<group value="mtf_migrated"/>
19+
<group value="checkout"/>
20+
<group value="tax"/>
21+
</annotations>
22+
<before>
23+
<createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/>
24+
<createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/>
25+
<createData entity="MinimumOrderAmount100" stepKey="minimumOrderAmount"/>
26+
<createData entity="taxRate_US_NY_8_1" stepKey="createTaxRateUSNY"/>
27+
<createData entity="DefaultTaxRuleWithCustomTaxRate" stepKey="createTaxRuleUSNY">
28+
<requiredEntity createDataKey="createTaxRateUSNY" />
29+
</createData>
30+
<createData entity="defaultSimpleProduct" stepKey="simpleProduct">
31+
<field key="price">10.00</field>
32+
</createData>
33+
<createData entity="ApiCategory" stepKey="createCategory"/>
34+
<createData entity="ApiConfigurableProduct" stepKey="configurableProduct">
35+
<requiredEntity createDataKey="createCategory"/>
36+
</createData>
37+
<createData entity="productAttributeWithTwoOptions" stepKey="createProductAttribute"/>
38+
<createData entity="productAttributeOption1" stepKey="createProductAttributeOption">
39+
<requiredEntity createDataKey="createProductAttribute"/>
40+
</createData>
41+
<createData entity="AddToDefaultSet" stepKey="addToDefaultSet">
42+
<requiredEntity createDataKey="createProductAttribute"/>
43+
</createData>
44+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getProductAttributeOption">
45+
<requiredEntity createDataKey="createProductAttribute"/>
46+
</getData>
47+
<createData entity="ApiSimpleOne" stepKey="configurableChildProduct">
48+
<requiredEntity createDataKey="createProductAttribute"/>
49+
<requiredEntity createDataKey="getProductAttributeOption"/>
50+
<field key="price">10.00</field>
51+
</createData>
52+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
53+
<requiredEntity createDataKey="configurableProduct"/>
54+
<requiredEntity createDataKey="createProductAttribute"/>
55+
<requiredEntity createDataKey="getProductAttributeOption"/>
56+
</createData>
57+
<createData entity="ConfigurableProductAddChild" stepKey="configurableProductAddChild">
58+
<requiredEntity createDataKey="configurableProduct"/>
59+
<requiredEntity createDataKey="configurableChildProduct"/>
60+
</createData>
61+
<createData entity="SimpleProduct2" stepKey="firstBundleChildProduct">
62+
<field key="price">100.00</field>
63+
</createData>
64+
<createData entity="SimpleProduct2" stepKey="secondBundleChildProduct">
65+
<field key="price">200.00</field>
66+
</createData>
67+
<createData entity="BundleProductPriceViewRange" stepKey="bundleProduct">
68+
<requiredEntity createDataKey="createCategory"/>
69+
</createData>
70+
<createData entity="MultipleSelectOption" stepKey="bundleOption">
71+
<requiredEntity createDataKey="bundleProduct"/>
72+
<field key="required">True</field>
73+
</createData>
74+
<createData entity="ApiBundleLink" stepKey="firstLinkOptionToProduct">
75+
<requiredEntity createDataKey="bundleProduct"/>
76+
<requiredEntity createDataKey="bundleOption"/>
77+
<requiredEntity createDataKey="firstBundleChildProduct"/>
78+
</createData>
79+
<createData entity="ApiBundleLink" stepKey="secondLinkOptionToProduct">
80+
<requiredEntity createDataKey="bundleProduct"/>
81+
<requiredEntity createDataKey="bundleOption"/>
82+
<requiredEntity createDataKey="secondBundleChildProduct"/>
83+
</createData>
84+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/>
85+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
86+
<argument name="indices" value=""/>
87+
</actionGroup>
88+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
89+
<argument name="tags" value=""/>
90+
</actionGroup>
91+
</before>
92+
<after>
93+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
94+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
95+
<deleteData createDataKey="configurableChildProduct" stepKey="deleteConfigurableChildProduct"/>
96+
<deleteData createDataKey="configurableProduct" stepKey="deleteConfigurableProduct"/>
97+
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
98+
<deleteData createDataKey="firstBundleChildProduct" stepKey="deleteFirstBundleChild"/>
99+
<deleteData createDataKey="secondBundleChildProduct" stepKey="deleteSecondBundleChild"/>
100+
<deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/>
101+
<deleteData createDataKey="createTaxRuleUSNY" stepKey="deleteTaxRuleUSNY"/>
102+
<deleteData createDataKey="createTaxRateUSNY" stepKey="deleteTaxRateUSNY"/>
103+
<createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/>
104+
<createData entity="DefaultMinimumOrderAmount" stepKey="defaultMinimumOrderAmount"/>
105+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/>
106+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
107+
</after>
108+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="openProductPageAndVerifyProduct">
109+
<argument name="product" value="$simpleProduct$"/>
110+
</actionGroup>
111+
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addSimpleProductToTheCart">
112+
<argument name="productQty" value="1"/>
113+
</actionGroup>
114+
<actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart">
115+
<argument name="urlKey" value="$configurableProduct.custom_attributes[url_key]$" />
116+
<argument name="productAttribute" value="$createProductAttribute.default_value$"/>
117+
<argument name="productOption" value="$getProductAttributeOption.label$"/>
118+
<argument name="qty" value="1"/>
119+
</actionGroup>
120+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKeyActionGroup" stepKey="openProductPageAndVerifyBundleProduct">
121+
<argument name="product" value="$bundleProduct$"/>
122+
</actionGroup>
123+
<actionGroup ref="StorefrontAddBundleProductFromProductToCartWithMultiOptionActionGroup" stepKey="addBundleProductToCart">
124+
<argument name="productName" value="$bundleProduct.name$"/>
125+
<argument name="optionName" value="$bundleOption.name$"/>
126+
<argument name="value" value="$firstBundleChildProduct.name$ +$100.00"/>
127+
</actionGroup>
128+
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="clickMiniCart"/>
129+
<actionGroup ref="CheckoutFillEstimateShippingAndTaxActionGroup" stepKey="fillEstimateShippingAndTaxFields">
130+
<argument name="address" value="US_Address_NY_Default_Shipping"/>
131+
</actionGroup>
132+
<click selector="{{CheckoutCartSummarySection.shippingMethodElementId('freeshipping', 'freeshipping')}}" stepKey="selectShippingMethod"/>
133+
<see selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="$9.72" stepKey="seeTaxAmount"/>
134+
<reloadPage stepKey="reloadThePage"/>
135+
<waitForPageLoad stepKey="waitForPageToReload"/>
136+
<see selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="$9.72" stepKey="seeTaxAmountAfterLoadPage"/>
137+
<scrollTo selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="scrollToProceedToCheckout" />
138+
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="goToCheckout"/>
139+
<waitForPageLoad stepKey="waitForPageToLoad"/>
140+
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillTheSignInForm">
141+
<argument name="customer" value="Simple_US_Customer"/>
142+
<argument name="customerAddress" value="US_Address_NY_Default_Shipping"/>
143+
</actionGroup>
144+
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickOnNextButton"/>
145+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
146+
<seeElement selector="{{StorefrontMinicartSection.emptyMiniCart}}" stepKey="assertEmptyCart" />
147+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumberWithoutLink}}" stepKey="orderId"/>
148+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="goToOrders"/>
149+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrderById">
150+
<argument name="orderId" value="$orderId"/>
151+
</actionGroup>
152+
<actionGroup ref="AdminAssertOrderAvailableButtonsActionGroup" stepKey="assertOrderButtons"/>
153+
<see selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$129.72" stepKey="seeGrandTotal"/>
154+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeOrderPendingStatus"/>
155+
<actionGroup ref="AdminShipThePendingOrderActionGroup" stepKey="shipTheOrder"/>
156+
<actionGroup ref="AssertOrderAddressInformationActionGroup" stepKey="assertCustomerInformation">
157+
<argument name="customer" value=""/>
158+
<argument name="shippingAddress" value="US_Address_NY_Default_Shipping"/>
159+
<argument name="billingAddress" value="US_Address_NY_Default_Shipping"/>
160+
<argument name="customerGroup" value=""/>
161+
</actionGroup>
162+
</test>
163+
</tests>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="StorefrontClickRefundTabCustomerOrderViewActionGroup">
12+
<annotations>
13+
<description>Click "Refund" tab for customer order view.</description>
14+
</annotations>
15+
16+
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefundTab"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoBankTransferPaymentTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@
133133
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
134134
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
135135
<waitForPageLoad stepKey="waitForViewOrder"/>
136-
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
137-
<waitForPageLoad stepKey="waitRefundsLoad"/>
136+
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
138137
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
139138
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="555.00" stepKey="seeGrandTotal"/>
140139
</test>

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoPartialRefundTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@
127127
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
128128
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
129129
<waitForPageLoad stepKey="waitForViewOrder"/>
130-
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
131-
<waitForPageLoad stepKey="waitRefundsLoad"/>
130+
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
132131
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
133132
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="110.00" stepKey="seeGrandTotal"/>
134133

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithCashOnDeliveryTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@
120120
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
121121
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
122122
<waitForPageLoad stepKey="waitForViewOrder"/>
123-
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
124-
<waitForPageLoad stepKey="waitRefundsLoad"/>
123+
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
125124
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
126125
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="555.00" stepKey="seeGrandTotal"/>
127126
</test>

app/code/Magento/Sales/Test/Mftf/Test/AdminCreateCreditMemoWithPurchaseOrderTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@
119119
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
120120
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
121121
<waitForPageLoad stepKey="waitForViewOrder"/>
122-
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
123-
<waitForPageLoad stepKey="waitRefundsLoad"/>
122+
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
124123
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
125124
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="555.00" stepKey="seeGrandTotal"/>
126125
</test>

app/code/Magento/Tax/Test/Mftf/Data/TaxRuleData.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,17 @@
123123
<entity name="TaxRuleZeroRate" type="taxRule">
124124
<data key="name" unique="suffix">TaxNameZeroRate</data>
125125
</entity>
126+
<entity name="DefaultTaxRuleWithCustomTaxRate" type="taxRule">
127+
<data key="code" unique="suffix">TaxRule</data>
128+
<data key="position">0</data>
129+
<data key="priority">0</data>
130+
<array key="customer_tax_class_ids">
131+
<item>3</item>
132+
</array>
133+
<array key="product_tax_class_ids">
134+
<item>2</item>
135+
</array>
136+
<var key="tax_rate_ids" entityType="taxRate" entityKey="id"/>
137+
<data key="calculate_subtotal">false</data>
138+
</entity>
126139
</entities>

lib/web/mage/requirejs/resolver.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ define([
3737
return registry[module.id] && (registry[module.id].inited || registry[module.id].error);
3838
}
3939

40+
/**
41+
* Checks if provided module had path fallback triggered.
42+
*
43+
* @param {Object} module - Module to be checked.
44+
* @return {Boolean}
45+
*/
46+
function isPathFallback(module) {
47+
return registry[module.id] && registry[module.id].events.error;
48+
}
49+
4050
/**
4151
* Checks if provided module has unresolved dependencies.
4252
*
@@ -48,7 +58,8 @@ define([
4858
return false;
4959
}
5060

51-
return module.depCount > _.filter(module.depMaps, isRejected).length;
61+
return module.depCount >
62+
_.filter(module.depMaps, isRejected).length + _.filter(module.depMaps, isPathFallback).length;
5263
}
5364

5465
/**

0 commit comments

Comments
 (0)