Skip to content

Commit 85fa979

Browse files
author
Stas Puga
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-11930
2 parents c433cbd + ae611f6 commit 85fa979

File tree

180 files changed

+3395
-456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+3395
-456
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4335,7 +4335,7 @@ Tests:
43354335
* Fixed order placing with virtual product using Express Checkout
43364336
* Fixed the error during order placement with Recurring profile payment
43374337
* Fixed wrong redirect after customer registration during multishipping checkout
4338-
* Fixed inability to crate shipping labels
4338+
* Fixed inability to create shipping labels
43394339
* Fixed inability to switch language, if the default language is English
43404340
* Fixed an issue with incorrect XML appearing in cache after some actions on the frontend
43414341
* Fixed product export
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AssertAdminDashboardPageIsVisibleActionGroup">
12+
<seeInCurrentUrl url="{{AdminDashboardPage.url}}" stepKey="seeDashboardUrl"/>
13+
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
14+
</actionGroup>
15+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertMessageOnAdminLoginActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<argument name="message" type="string" defaultValue="The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later." />
1414
<argument name="messageType" type="string" defaultValue="error" />
1515
</arguments>
16+
17+
<waitForElementVisible selector="{{AdminLoginMessagesSection.messageByType(messageType)}}" stepKey="waitForAdminLoginFormMessage" />
1618
<see userInput="{{message}}" selector="{{AdminLoginMessagesSection.messageByType(messageType)}}" stepKey="verifyMessage" />
1719
</actionGroup>
1820
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminForgotPasswordPage" url="admin/auth/forgotpassword/" area="admin" module="Magento_Backend">
12+
<section name="AdminForgotPasswordFormSection"/>
13+
</page>
14+
</pages>

app/code/Magento/Backend/Test/Mftf/Page/AdminLoginPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="AdminLoginPage" url="admin" area="admin" module="Magento_Backend">
12+
<section name="AdminLoginMessagesSection"/>
1213
<section name="AdminLoginFormSection"/>
1314
</page>
1415
</pages>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminForgotPasswordFormSection">
12+
<element name="email" type="input" selector="#login-form input[name='email']"/>
13+
<element name="retrievePasswordButton" type="button" selector="#login-form button[type='submit']" timeout="30"/>
14+
</section>
15+
</sections>

app/code/Magento/Backend/Test/Mftf/Section/AdminLoginFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="username" type="input" selector="#username"/>
1313
<element name="password" type="input" selector="#login"/>
1414
<element name="signIn" type="button" selector=".actions .action-primary" timeout="30"/>
15+
<element name="forgotPasswordLink" type="button" selector=".action-forgotpassword" timeout="10"/>
1516
</section>
1617
</sections>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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="AdminUserLoginWithStoreCodeInUrlTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="Admin panel should be accessible with Add Store Code to URL setting enabled"/>
15+
<description value="Admin panel should be accessible with Add Store Code to URL setting enabled"/>
16+
<testCaseId value="MC-14279" />
17+
<group value="backend"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<magentoCLI command="config:set {{StorefrontEnableAddStoreCodeToUrls.path}} {{StorefrontEnableAddStoreCodeToUrls.value}}" stepKey="addStoreCodeToUrlEnable"/>
22+
</before>
23+
<after>
24+
<magentoCLI command="config:set {{StorefrontDisableAddStoreCodeToUrls.path}} {{StorefrontDisableAddStoreCodeToUrls.value}}" stepKey="addStoreCodeToUrlDisable"/>
25+
</after>
26+
27+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
28+
<actionGroup ref="AssertAdminDashboardPageIsVisibleActionGroup" stepKey="seeDashboardPage"/>
29+
</test>
30+
</tests>

app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public function execute()
5858
$this->_coreRegistry->register('backup_manager', $backupManager);
5959

6060
if ($this->getRequest()->getParam('maintenance_mode')) {
61-
if (!$this->maintenanceMode->set(true)) {
61+
$this->maintenanceMode->set(true);
62+
63+
if (!$this->maintenanceMode->isOn()) {
6264
$response->setError(
6365
__(
6466
'You need more permissions to activate maintenance mode right now.'

app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
*/
77
namespace Magento\Backup\Controller\Adminhtml\Index;
88

9+
use Magento\Framework\App\Action\HttpPostActionInterface;
910
use Magento\Framework\App\Filesystem\DirectoryList;
1011
use Magento\Framework\Filesystem;
1112

1213
/**
14+
* Backup rollback controller.
15+
*
1316
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1417
*/
15-
class Rollback extends \Magento\Backup\Controller\Adminhtml\Index
18+
class Rollback extends \Magento\Backup\Controller\Adminhtml\Index implements HttpPostActionInterface
1619
{
1720
/**
1821
* Rollback Action
@@ -82,7 +85,9 @@ public function execute()
8285
}
8386

8487
if ($this->getRequest()->getParam('maintenance_mode')) {
85-
if (!$this->maintenanceMode->set(true)) {
88+
$this->maintenanceMode->set(true);
89+
90+
if (!$this->maintenanceMode->isOn()) {
8691
$response->setError(
8792
__(
8893
'You need more permissions to activate maintenance mode right now.'
@@ -122,6 +127,7 @@ public function execute()
122127
$adminSession->destroy();
123128

124129
$response->setRedirectUrl($this->getUrl('*'));
130+
// phpcs:disable Magento2.Exceptions.ThrowCatch
125131
} catch (\Magento\Framework\Backup\Exception\CantLoadSnapshot $e) {
126132
$errorMsg = __('We can\'t find the backup file.');
127133
} catch (\Magento\Framework\Backup\Exception\FtpConnectionFailed $e) {

0 commit comments

Comments
 (0)