Skip to content

Commit

Permalink
🔃 [Magento Community Engineering] Community Contributions - 2.4-devel…
Browse files Browse the repository at this point in the history
…op 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
  • Loading branch information
magento-engcom-team authored Sep 21, 2020
2 parents 7ddd47e + d7f3e8c commit 390505a
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontClickRefundTabCustomerOrderViewActionGroup">
<annotations>
<description>Click "Refund" tab for customer order view.</description>
</annotations>

<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefundTab"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
<waitForPageLoad stepKey="waitForViewOrder"/>
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
<waitForPageLoad stepKey="waitRefundsLoad"/>
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="555.00" stepKey="seeGrandTotal"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
<waitForPageLoad stepKey="waitForViewOrder"/>
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
<waitForPageLoad stepKey="waitRefundsLoad"/>
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="110.00" stepKey="seeGrandTotal"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
<waitForPageLoad stepKey="waitForViewOrder"/>
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
<waitForPageLoad stepKey="waitRefundsLoad"/>
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="555.00" stepKey="seeGrandTotal"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@
<scrollTo selector="{{StorefrontCustomerResentOrdersSection.blockResentOrders}}" stepKey="scrollToResent"/>
<click selector="{{StorefrontCustomerResentOrdersSection.viewOrder({$grabOrderId})}}" stepKey="clickOnOrder"/>
<waitForPageLoad stepKey="waitForViewOrder"/>
<click selector="{{StorefrontCustomerOrderSection.tabRefund}}" stepKey="clickRefund"/>
<waitForPageLoad stepKey="waitRefundsLoad"/>
<actionGroup ref="StorefrontClickRefundTabCustomerOrderViewActionGroup" stepKey="clickRefund"/>
<scrollTo selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" stepKey="scrollToGrandTotal"/>
<see selector="{{StorefrontCustomerOrderSection.grandTotalRefund}}" userInput="555.00" stepKey="seeGrandTotal"/>
</test>
Expand Down
13 changes: 12 additions & 1 deletion lib/web/mage/requirejs/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ define([
return registry[module.id] && (registry[module.id].inited || registry[module.id].error);
}

/**
* Checks if provided module had path fallback triggered.
*
* @param {Object} module - Module to be checked.
* @return {Boolean}
*/
function isPathFallback(module) {
return registry[module.id] && registry[module.id].events.error;
}

/**
* Checks if provided module has unresolved dependencies.
*
Expand All @@ -48,7 +58,8 @@ define([
return false;
}

return module.depCount > _.filter(module.depMaps, isRejected).length;
return module.depCount >
_.filter(module.depMaps, isRejected).length + _.filter(module.depMaps, isPathFallback).length;
}

/**
Expand Down

0 comments on commit 390505a

Please sign in to comment.