Skip to content

Commit b224af0

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into MCP-218
2 parents 07ca5f5 + 6a63aac commit b224af0

File tree

157 files changed

+1966
-476
lines changed

Some content is hidden

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

157 files changed

+1966
-476
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AssertAdminDashboardDisplayedWithNoErrorsActionGroup">
12+
<annotations>
13+
<description>Checks if Dashboard is displayed properly</description>
14+
</annotations>
15+
16+
<seeElement selector="{{AdminDashboardSection.dashboardDiagramOrderContentTab}}" stepKey="seeOrderContentTab"/>
17+
<seeElement selector="{{AdminDashboardSection.dashboardDiagramContent}}" stepKey="seeDiagramContent"/>
18+
<click selector="{{AdminDashboardSection.dashboardDiagramAmounts}}" stepKey="clickDashboardAmount"/>
19+
<waitForLoadingMaskToDisappear stepKey="waitForDashboardAmountLoading"/>
20+
<seeElement selector="{{AdminDashboardSection.dashboardDiagramAmountsContentTab}}" stepKey="seeDiagramAmountContent"/>
21+
<seeElement selector="{{AdminDashboardSection.dashboardDiagramTotals}}" stepKey="seeAmountTotals"/>
22+
<dontSeeJsError stepKey="dontSeeJsError"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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="AdminCheckDashboardWithChartsTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Google Charts on Magento dashboard"/>
15+
<title value="Admin should see Google chart on Magento dashboard"/>
16+
<description value="Google chart on Magento dashboard page is displaying properly"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MAGETWO-98934"/>
19+
<useCaseId value="MAGETWO-98584"/>
20+
<group value="backend"/>
21+
</annotations>
22+
<before>
23+
<magentoCLI command="config:set admin/dashboard/enable_charts 1" stepKey="setEnableCharts"/>
24+
<createData entity="SimpleProduct2" stepKey="createProduct">
25+
<field key="price">150</field>
26+
</createData>
27+
<createData entity="Simple_US_Customer" stepKey="createCustomer">
28+
<field key="firstname">John1</field>
29+
<field key="lastname">Doe1</field>
30+
</createData>
31+
<createData entity="CustomerCart" stepKey="createCustomerCart">
32+
<requiredEntity createDataKey="createCustomer"/>
33+
</createData>
34+
<createData entity="CustomerCartItem" stepKey="addCartItem">
35+
<requiredEntity createDataKey="createCustomerCart"/>
36+
<requiredEntity createDataKey="createProduct"/>
37+
</createData>
38+
<createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress">
39+
<requiredEntity createDataKey="createCustomerCart"/>
40+
</createData>
41+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
42+
</before>
43+
<after>
44+
<magentoCLI command="config:set admin/dashboard/enable_charts 0" stepKey="setDisableChartsAsDefault"/>
45+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
46+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
47+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
48+
</after>
49+
50+
<grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityBefore"/>
51+
52+
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="sendCustomerPaymentInformation">
53+
<requiredEntity createDataKey="createCustomerCart"/>
54+
</updateData>
55+
<createData entity="Invoice" stepKey="invoiceOrder">
56+
<requiredEntity createDataKey="createCustomerCart"/>
57+
</createData>
58+
<createData entity="Shipment" stepKey="shipOrder">
59+
<requiredEntity createDataKey="createCustomerCart"/>
60+
</createData>
61+
62+
<reloadPage stepKey="refreshPage"/>
63+
<actionGroup ref="AssertAdminDashboardDisplayedWithNoErrorsActionGroup" stepKey="assertAdminDashboardNotBroken"/>
64+
<grabTextFrom selector="{{AdminDashboardSection.dashboardTotals('Quantity')}}" stepKey="grabQuantityAfter"/>
65+
<assertGreaterThan stepKey="checkQuantityWasChanged">
66+
<actualResult type="const">$grabQuantityAfter</actualResult>
67+
<expectedResult type="const">$grabQuantityBefore</expectedResult>
68+
</assertGreaterThan>
69+
</test>
70+
</tests>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminDashboardWithChartsTest">
11+
<test name="AdminDashboardWithChartsTest" deprecated="Use AdminCheckDashboardWithChartsTest instead">
1212
<annotations>
1313
<features value="Backend"/>
1414
<stories value="Google Charts on Magento dashboard"/>
15-
<title value="Admin should see Google chart on Magento dashboard"/>
15+
<title value="DEPRECATED. Admin should see Google chart on Magento dashboard"/>
1616
<description value="Google chart on Magento dashboard page is displaying properly"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-98934"/>
1919
<useCaseId value="MAGETWO-98584"/>
2020
<group value="backend"/>
21+
<skip>
22+
<issueId value="DEPRECATED">Use AdminCheckDashboardWithChartsTest instead</issueId>
23+
</skip>
2124
</annotations>
2225
<before>
2326
<magentoCLI command="config:set admin/dashboard/enable_charts 1" stepKey="setEnableCharts"/>

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ script;
200200
setLocation(url);
201201
';
202202
} else {
203-
$scriptString .= <<<script
203+
$scriptString .= <<<'script'
204204
jQuery('#preview_selected_store').val(scopeId);
205205
jQuery('#preview_form').submit();
206206

app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleByDescriptionTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<title value="Guest customer should be able to advance search Bundle product with product description"/>
1616
<description value="Guest customer should be able to advance search Bundle product with product description"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MC-242"/>
19-
<group value="Bundle"/>
18+
<testCaseId value="MC-25427"/>
19+
<group value="bundle"/>
2020
<group value="SearchEngineElasticsearch"/>
2121
</annotations>
2222
<before>
@@ -43,9 +43,9 @@
4343
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
4444
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
4545
</after>
46-
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47-
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48-
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
49-
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
46+
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47+
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48+
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
49+
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
5050
</test>
5151
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleByPriceTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<title value="Guest customer should be able to advance search Bundle product with product price"/>
1616
<description value="Guest customer should be able to advance search Bundle product with product price"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MC-251"/>
19-
<group value="Bundle"/>
18+
<testCaseId value="MC-25435"/>
19+
<group value="bundle"/>
2020
<group value="SearchEngineElasticsearch"/>
2121
</annotations>
2222
<before>
@@ -52,9 +52,9 @@
5252
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
5353
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
5454
</after>
55-
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
56-
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
57-
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
58-
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
55+
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
56+
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
57+
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
58+
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
5959
</test>
6060
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleByShortDescriptionTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<title value="Guest customer should be able to advance search Bundle product with product short description"/>
1616
<description value="Guest customer should be able to advance search Bundle product with product short description"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MC-250"/>
19-
<group value="Bundle"/>
18+
<testCaseId value="MC-25434"/>
19+
<group value="bundle"/>
2020
<group value="SearchEngineElasticsearch"/>
2121
</annotations>
2222
<before>
@@ -43,9 +43,9 @@
4343
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
4444
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
4545
</after>
46-
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47-
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48-
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
49-
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
46+
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47+
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48+
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
49+
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
5050
</test>
5151
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleProductTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<title value="Guest customer should be able to advance search Bundle product with product name"/>
1616
<description value="Guest customer should be able to advance search Bundle product with product name"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MC-139"/>
19-
<group value="Bundle"/>
18+
<testCaseId value="MC-25342"/>
19+
<group value="bundle"/>
2020
<group value="SearchEngineElasticsearch"/>
2121
</annotations>
2222
<before>
@@ -43,9 +43,9 @@
4343
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
4444
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
4545
</after>
46-
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47-
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48-
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
49-
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
46+
<see userInput="1 item" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47+
<see userInput="$product.name$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48+
<comment userInput="BIC workaround" stepKey="seeSimple1ProductName"/>
49+
<comment userInput="BIC workaround" stepKey="seeSimple2ProductName"/>
5050
</test>
5151
</tests>

app/code/Magento/Catalog/Model/Category.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,10 @@ public function reindex()
11591159
*/
11601160
public function afterDeleteCommit()
11611161
{
1162-
$this->reindex();
1162+
if ($this->getIsActive() || $this->getDeletedChildrenIds()) {
1163+
$this->reindex();
1164+
}
1165+
11631166
return parent::afterDeleteCommit();
11641167
}
11651168

app/code/Magento/Catalog/Model/Product.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -828,9 +828,6 @@ public function getStoreIds()
828828
if (!$this->hasStoreIds()) {
829829
$storeIds = [];
830830
if ($websiteIds = $this->getWebsiteIds()) {
831-
if (!$this->isObjectNew() && $this->_storeManager->isSingleStoreMode()) {
832-
$websiteIds = array_keys($websiteIds);
833-
}
834831
foreach ($websiteIds as $websiteId) {
835832
$websiteStores = $this->_storeManager->getWebsite($websiteId)->getStoreIds();
836833
$storeIds[] = $websiteStores;

0 commit comments

Comments
 (0)