Skip to content

Commit 390505a

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop latest changes
Accepted Community Pull Requests: - #30030: [MFTF] Create StorefrontClickRefundTabCustomerOrderViewActionGroup (by @Usik2203) - #28117: RequireJS resolver sometimes fails to detect blocked resources (by @ishakhsuvarov) Fixed GitHub Issues: - #30032: [Issue] [MFTF] Create StorefrontClickRefundTabCustomerOrderViewActionGroup (reported by @m2-assistant[bot]) has been fixed in #30030 by @Usik2203 in 2.4-develop branch Related commits: 1. 996bdaf 2. 772886e 3. 173356c - #28116: RequireJS resolver sometimes fails to detect blocked resources (reported by @ishakhsuvarov) has been fixed in #28117 by @ishakhsuvarov in 2.4-develop branch Related commits: 1. 303bd64 2. bfdde51 3. c1f132b 4. 8602bef 5. 375b129
2 parents 7ddd47e + d7f3e8c commit 390505a

6 files changed

+35
-9
lines changed
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

+1-2
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

+1-2
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

+1-2
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

+1-2
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>

lib/web/mage/requirejs/resolver.js

+12-1
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)