Skip to content

Commit 4bfca16

Browse files
committed
Merge remote-tracking branch 'mainline/2.4-develop' into 2.4-develop-pr7
2 parents 43ab003 + d001f7b commit 4bfca16

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@
1818
<severity value="MAJOR"/>
1919
<group value="backend"/>
2020
<group value="mtf_migrated"/>
21-
<skip>
22-
<issueId value="MC-17140"/>
23-
</skip>
2421
</annotations>
2522
<before>
2623
<magentoCLI command="config:set {{MinifyJavaScriptFilesEnableConfigData.path}} {{MinifyJavaScriptFilesEnableConfigData.value}}" stepKey="enableJsMinification"/>
24+
<magentoCLI command="cache:clean config" stepKey="cleanCache"/>
2725
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2826
</before>
2927
<after>
3028
<magentoCLI command="config:set {{MinifyJavaScriptFilesDisableConfigData.path}} {{MinifyJavaScriptFilesDisableConfigData.value}}" stepKey="disableJsMinification"/>
3129
<actionGroup ref="logout" stepKey="logout"/>
3230
</after>
33-
31+
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
32+
<waitForPageLoad stepKey="waitForPageLoadOnDashboard"/>
3433
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="loggedInSuccessfully"/>
3534
<actionGroup ref="AssertAdminPageIsNot404ActionGroup" stepKey="dontSee404Page"/>
3635
</test>

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<testCaseId value="MC-14770"/>
1818
<group value="CatalogRule"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17140"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<!-- Login as Admin -->

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<testCaseId value="MC-14771"/>
1818
<group value="CatalogRule"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17140"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<!-- Login as Admin -->

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<testCaseId value="MC-14772"/>
1818
<group value="CatalogRule"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17140"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<!-- Login as Admin -->

dev/tests/integration/framework/Magento/TestFramework/Event/Transaction.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
namespace Magento\TestFramework\Event;
8+
79
/**
810
* Database transaction events manager
911
*/
10-
namespace Magento\TestFramework\Event;
11-
1212
class Transaction
1313
{
1414
/**
@@ -86,14 +86,29 @@ protected function _processTransactionRequests($eventName, \PHPUnit\Framework\Te
8686
* Start transaction and fire 'startTransaction' event
8787
*
8888
* @param \PHPUnit\Framework\TestCase $test
89+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
8990
*/
9091
protected function _startTransaction(\PHPUnit\Framework\TestCase $test)
9192
{
9293
if (!$this->_isTransactionActive) {
9394
$this->_getConnection()->beginTransparentTransaction();
9495
$this->_isTransactionActive = true;
9596
try {
97+
/**
98+
* Add any warning during transaction execution as a failure.
99+
*/
100+
set_error_handler(
101+
function ($errNo, $errStr, $errFile, $errLine) use ($test) {
102+
$errMsg = sprintf("%s: %s in %s:%s.", "Warning", $errStr, $errFile, $errLine);
103+
$test->getTestResultObject()->addError($test, new \PHPUnit\Framework\Warning($errMsg), 0);
104+
105+
// Allow error to be handled by next error handler
106+
return false;
107+
},
108+
E_WARNING
109+
);
96110
$this->_eventManager->fireEvent('startTransaction', [$test]);
111+
restore_error_handler();
97112
} catch (\Exception $e) {
98113
$test->getTestResultObject()->addFailure(
99114
$test,

dev/tests/integration/phpunit.xml.dist

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@
7878
</php>
7979
<!-- Test listeners -->
8080
<listeners>
81-
<listener class="Magento\TestFramework\Event\PhpUnit"/>
82-
<listener class="Magento\TestFramework\ErrorLog\Listener"/>
8381
<listener class="Yandex\Allure\Adapter\AllureAdapter">
8482
<arguments>
8583
<string>var/allure-results</string> <!-- XML files output directory -->
@@ -127,5 +125,8 @@
127125
</array>
128126
</arguments>
129127
</listener>
128+
<!-- Run after AllureAdapter to allow it to initialize properly -->
129+
<listener class="Magento\TestFramework\Event\PhpUnit"/>
130+
<listener class="Magento\TestFramework\ErrorLog\Listener"/>
130131
</listeners>
131132
</phpunit>

0 commit comments

Comments
 (0)