Skip to content

Commit fb704a5

Browse files
committed
Merge branch '2.4-develop' into L3_PR_21-10-19
2 parents 215a515 + c2c5ec4 commit fb704a5

File tree

319 files changed

+4911
-2721
lines changed

Some content is hidden

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

319 files changed

+4911
-2721
lines changed

app/code/Magento/Analytics/Test/Unit/ReportXml/SelectHydratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function testRecreateWithExpression(
198198
->willReturn($this->selectMock);
199199
$withArgs = [];
200200

201-
foreach (array_keys($selectParts) as $key => $partName) {
201+
foreach (array_keys($selectParts) as $partName) {
202202
$withArgs[] = [$partName, $expectedParts[$partName]];
203203
}
204204
$this->selectMock
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AssertAdminPageTitleActionGroup">
12+
<annotations>
13+
<description>Check Admin Page Title is present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="value" type="string"/>
17+
</arguments>
18+
19+
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="{{value}}" stepKey="seePageTitle"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="AdminOrderViewPage" url="sales/order/view/order_id/{{entity_id}}" area="admin" module="Backend"/>
10+
</pages>

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
<comment userInput="Go to checkout" stepKey="goToCheckout"/>
6565
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
6666
<waitForLoadingMaskToDisappear stepKey="waitForLoadingCheckoutPageWithShippingMethod"/>
67-
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
68-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask1"/>
67+
<actionGroup ref="StorefrontSelectFirstShippingMethodActionGroup" stepKey="selectFirstShippingMethod"/>
68+
<comment userInput="Adding the comment to replace waitForLoadingMask1 action for preserving Backward Compatibility" stepKey="waitForLoadingMask1"/>
6969
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
7070
<!-- Checkout select Check/Money Order payment -->
7171
<comment userInput="Select Check/Money payment" stepKey="checkoutSelectCheckMoneyPayment"/>
@@ -87,7 +87,9 @@
8787

8888
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
8989
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton"/>
90-
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
90+
<actionGroup ref="AssertAdminPageTitleActionGroup" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton">
91+
<argument name="value" value="New Invoice"/>
92+
</actionGroup>
9193
<see selector="{{AdminInvoiceTotalSection.total('Subtotal')}}" userInput="$150.00" stepKey="seeCorrectGrandTotal"/>
9294
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
9395
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessInvoiceMessage"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3333
</after>
3434
<waitForPageLoad stepKey="waitForPageLoadOnDashboard"/>
35-
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
35+
<actionGroup ref="AssertAdminPageTitleActionGroup" stepKey="seeDashboardTitle">
36+
<argument name="value" value="Dashboard"/>
37+
</actionGroup>
3638
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="loggedInSuccessfully"/>
3739
<actionGroup ref="AssertAdminPageIsNot404ActionGroup" stepKey="dontSee404Page"/>
3840
</test>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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="AdminStartupPageTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Admin should see selected Startup Page after login."/>
15+
<title value="Admin should see selected Startup Page after login."/>
16+
<description value="Admin should see selected Startup Page after login."/>
17+
<severity value="MINOR"/>
18+
</annotations>
19+
<before>
20+
<magentoCLI command="config:set admin/startup/menu_item_id Magento_Sales::sales_order" stepKey="selectSalesOrderStartupPage"/>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
22+
</before>
23+
<after>
24+
<magentoCLI command="config:set admin/startup/menu_item_id Magento_Backend::dashboard" stepKey="selectDashboardStartupPage"/>
25+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
26+
</after>
27+
28+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
29+
<argument name="tags" value="config full_page"/>
30+
</actionGroup>
31+
32+
<actionGroup ref="AssertAdminPageTitleActionGroup" stepKey="checkPageTitle">
33+
<argument name="value" value="Orders"/>
34+
</actionGroup>
35+
</test>
36+
</tests>

app/code/Magento/Backend/Test/Unit/Controller/Adminhtml/System/Account/SaveTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,7 @@ protected function setUp(): void
195195
$args = ['context' => $contextMock];
196196

197197
$testHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
198-
$this->controller = $testHelper->getObject(
199-
Save::class,
200-
$args
201-
);
198+
$this->controller = $testHelper->getObject(Save::class, $args);
202199
}
203200

204201
/**

app/code/Magento/Bundle/Test/Unit/Model/Product/TypeTest.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,8 +1383,7 @@ public function testPrepareForCartAdvancedAllRequiredOption(): void
13831383
'getBundleOption',
13841384
'getBundleOptionsData'
13851385
]
1386-
)
1387-
->disableOriginalConstructor()
1386+
)->disableOriginalConstructor()
13881387
->getMock();
13891388
/* @var \PHPUnit\Framework\MockObject\MockObject|\Magento\Catalog\Model\Product\Option $option */
13901389
$option = $this->getMockBuilder(Option::class)
@@ -1405,8 +1404,7 @@ public function testPrepareForCartAdvancedAllRequiredOption(): void
14051404
'hasData',
14061405
'getData'
14071406
]
1408-
)
1409-
->addMethods(['getHasOptions', 'setCartQty', 'getSkipCheckRequiredOption'])
1407+
)->addMethods(['getHasOptions', 'setCartQty', 'getSkipCheckRequiredOption'])
14101408
->disableOriginalConstructor()
14111409
->getMock();
14121410
/** @var MockObject|Type $productType */
@@ -1419,7 +1417,6 @@ public function testPrepareForCartAdvancedAllRequiredOption(): void
14191417
->onlyMethods(['getItems'])
14201418
->disableOriginalConstructor()
14211419
->getMock();
1422-
14231420
$this->parentClass($group, $option, $buyRequest, $product);
14241421

14251422
$product->expects($this->any())
@@ -1444,7 +1441,6 @@ function ($key) use ($optionCollection) {
14441441
$resultValue = [0 => 5];
14451442
break;
14461443
}
1447-
14481444
return $resultValue;
14491445
}
14501446
);
@@ -1456,8 +1452,7 @@ function ($key) use ($optionCollection) {
14561452
$buyRequest->expects($this->once())
14571453
->method('getBundleOption')
14581454
->willReturn([3 => 5]);
1459-
$option
1460-
->method('getId')
1455+
$option->method('getId')
14611456
->willReturnOnConsecutiveCalls(3);
14621457
$option->expects($this->once())
14631458
->method('getRequired')

app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/Form/Modifier/BundlePanelTest.php

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,20 @@ public function testModifyMeta(string $shipmentTypePath, string $dataScope): voi
135135
->willReturn([]);
136136
$this->arrayManagerMock->method('set')
137137
->willReturn([]);
138+
139+
$metaArgument = [
140+
$shipmentTypePath . BundlePanel::META_CONFIG_PATH,
141+
[],
142+
[
143+
'dataScope' => $dataScope,
144+
'validation' => [
145+
'required-entry' => false
146+
]
147+
]
148+
];
138149
$this->arrayManagerMock
139150
->method('merge')
140-
->withConsecutive(
141-
[], [], [], [], [], [], [], [], [], [], [], [],
142-
[
143-
$shipmentTypePath . BundlePanel::META_CONFIG_PATH,
144-
[],
145-
[
146-
'dataScope' => $dataScope,
147-
'validation' => [
148-
'required-entry' => false
149-
]
150-
]
151-
]
152-
153-
);
151+
->withConsecutive([], [], [], [], [], [], [], [], [], [], [], [], $metaArgument);
154152
$this->bundlePanelModel->modifyMeta($sourceMeta);
155153
}
156154

app/code/Magento/BundleImportExport/Test/Unit/Model/Import/Product/Type/BundleTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ protected function setUp(): void
158158
'delete',
159159
'quoteInto',
160160
'fetchAssoc'
161-
])
161+
]
162+
)
162163
->disableOriginalConstructor()
163164
->getMock();
164165
$this->select = $this->createMock(Select::class);

0 commit comments

Comments
 (0)