Skip to content

Commit eeb7433

Browse files
authored
Merge branch '2.4-develop' into issue-27051
2 parents c1a01fc + 6b6f428 commit eeb7433

File tree

971 files changed

+24506
-5179
lines changed

Some content is hidden

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

971 files changed

+24506
-5179
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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="AdminFillSearchTermActionGroup">
12+
<annotations>
13+
<description>Fills the search terms form with sample data.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="searchQuery" type="string"/>
17+
<argument name="store" type="string"/>
18+
<argument name="redirectUrl" type="string"/>
19+
<argument name="suggestedTerms" type="string"/>
20+
</arguments>
21+
<!-- Fill form fields -->
22+
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.query_text}}" userInput="{{searchQuery}}" stepKey="fillFieldSearchQuery"/>
23+
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.store_id}}" userInput="{{store}}" stepKey="selectStoreView"/>
24+
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.redirect}}" userInput="{{redirectUrl}}" stepKey="fillFieldRedirectUrl"/>
25+
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.display_in_terms}}" userInput="{{suggestedTerms}}" stepKey="selectSuggestedTerms" />
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminOpenNewSearchTermsPageActionGroup">
12+
<annotations>
13+
<description>Navigate to search terms form page.</description>
14+
</annotations>
15+
<amOnPage url="{{AdminSearchTermsFormPage.url}}" stepKey="amOnSearchTermsForm"/>
16+
<waitForPageLoad stepKey="waitForPageLoad1"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminSaveSearchTermActionGroup">
12+
<annotations>
13+
<description>Save a new search term from Magento admin.</description>
14+
</annotations>
15+
<!-- Click save action and verify success message -->
16+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveSearchButton"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="SearchTerms">
12+
<data key="searchQuery" unique="suffix">books</data>
13+
<data key="store">Default Store View</data>
14+
<data key="redirectUrl">http://sample.com</data>
15+
<data key="suggestedTerms">1</data>
16+
</entity>
17+
</entities>
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="AdminSearchTermsFormPage" url="search/term/new/" area="admin" module="Magento_AdvancedSearch">
12+
<section name="AdminSearchTermsPageFormFieldsSection"/>
13+
</page>
14+
</pages>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AdminSearchTermsPageFormFieldsSection">
12+
<element name="query_text" type="input" selector="#query_text"/>
13+
<element name="store_id" type="select" selector="#store_id"/>
14+
<element name="redirect" type="input" selector="#redirect"/>
15+
<element name="display_in_terms" type="select" selector="#display_in_terms"/>
16+
</section>
17+
</sections>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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="AdminAddSearchTermTest">
12+
<annotations>
13+
<features value="AdvancedSearch"/>
14+
<stories value="Add a new search term"/>
15+
<title value="Admin should be able to create a new search term"/>
16+
<description value="Admin should be able to create a new search term using search terms grid"/>
17+
<severity value="CRITICAL"/>
18+
<group value="AdvancedSearch"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
25+
</after>
26+
<actionGroup ref="AdminOpenNewSearchTermsPageActionGroup" stepKey="navigateToSearchTermPage"/>
27+
<actionGroup ref="AdminFillSearchTermActionGroup" stepKey="fillNewSearchTermData">
28+
<argument name="searchQuery" value="{{SearchTerms.searchQuery}}"/>
29+
<argument name="store" value="{{SearchTerms.store}}"/>
30+
<argument name="redirectUrl" value="{{SearchTerms.redirectUrl}}"/>
31+
<argument name="suggestedTerms" value="{{SearchTerms.suggestedTerms}}"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminSaveSearchTermActionGroup" stepKey="saveSearchTerm"/>
34+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSaveSearchTermSuccessMessage">
35+
<argument name="message" value="You saved the search term."/>
36+
<argument name="messageType" value="success"/>
37+
</actionGroup>
38+
</test>
39+
</tests>

app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66

77
namespace Magento\Amqp\Test\Unit\Setup;
88

9+
use Magento\Amqp\Setup\ConnectionValidator;
10+
use Magento\Framework\Config\Data\ConfigData;
911
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1012
use Magento\Amqp\Setup\ConfigOptionsList;
1113
use Magento\Framework\Setup\Option\TextConfigOption;
1214
use Magento\Framework\App\DeploymentConfig;
15+
use PHPUnit\Framework\MockObject\MockObject;
16+
use PHPUnit\Framework\TestCase;
1317

14-
class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
18+
class ConfigOptionsListTest extends TestCase
1519
{
1620
/**
1721
* @var ObjectManager
@@ -24,12 +28,12 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
2428
private $model;
2529

2630
/**
27-
* @var \Magento\Amqp\Setup\ConnectionValidator|\PHPUnit_Framework_MockObject_MockObject
31+
* @var ConnectionValidator|MockObject
2832
*/
2933
private $connectionValidatorMock;
3034

3135
/**
32-
* @var \Magento\Framework\App\DeploymentConfig|\PHPUnit_Framework_MockObject_MockObject
36+
* @var DeploymentConfig|MockObject
3337
*/
3438
private $deploymentConfigMock;
3539

@@ -38,7 +42,7 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
3842
*/
3943
private $options;
4044

41-
protected function setUp()
45+
protected function setUp(): void
4246
{
4347
$this->options = [
4448
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_HOST => 'host',
@@ -51,18 +55,18 @@ protected function setUp()
5155
];
5256

5357
$this->objectManager = new ObjectManager($this);
54-
$this->connectionValidatorMock = $this->getMockBuilder(\Magento\Amqp\Setup\ConnectionValidator::class)
58+
$this->connectionValidatorMock = $this->getMockBuilder(ConnectionValidator::class)
5559
->disableOriginalConstructor()
5660
->setMethods([])
5761
->getMock();
5862

59-
$this->deploymentConfigMock = $this->getMockBuilder(\Magento\Framework\App\DeploymentConfig::class)
63+
$this->deploymentConfigMock = $this->getMockBuilder(DeploymentConfig::class)
6064
->disableOriginalConstructor()
6165
->setMethods([])
6266
->getMock();
6367

6468
$this->model = $this->objectManager->getObject(
65-
\Magento\Amqp\Setup\ConfigOptionsList::class,
69+
ConfigOptionsList::class,
6670
[
6771
'connectionValidator' => $this->connectionValidatorMock,
6872
]
@@ -135,9 +139,9 @@ public function testCreateConfig($options, $expectedConfigData)
135139
$result = $this->model->createConfig($options, $this->deploymentConfigMock);
136140
$this->assertInternalType('array', $result);
137141
$this->assertNotEmpty($result);
138-
/** @var \Magento\Framework\Config\Data\ConfigData $configData */
142+
/** @var ConfigData $configData */
139143
$configData = $result[0];
140-
$this->assertInstanceOf(\Magento\Framework\Config\Data\ConfigData::class, $configData);
144+
$this->assertInstanceOf(ConfigData::class, $configData);
141145
$this->assertEquals($expectedConfigData, $configData->getData());
142146
}
143147

app/code/Magento/AsynchronousOperations/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"require": {
88
"magento/framework": "*",
9+
"magento/framework-message-queue": "*",
910
"magento/framework-bulk": "*",
1011
"magento/module-authorization": "*",
1112
"magento/module-backend": "*",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
</annotations>
1515

1616
<waitForElementVisible selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="waitForAdminAccountTextVisible"/>
17+
<seeElement selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="assertAdminAccountTextElement"/>
1718
</actionGroup>
1819
</actionGroups>

0 commit comments

Comments
 (0)