Skip to content

Commit d4b0aa0

Browse files
authored
Merge branch '2.4-develop' into spartans_pr_22062022
2 parents 40f33c8 + cd826aa commit d4b0aa0

File tree

99 files changed

+1433
-359
lines changed

Some content is hidden

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

99 files changed

+1433
-359
lines changed
Loading
Loading
Loading
Loading

app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/Collection.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
*/
77
namespace Magento\AsynchronousOperations\Model\ResourceModel\Operation;
88

9+
use Magento\AsynchronousOperations\Model\Operation;
10+
use Magento\AsynchronousOperations\Model\ResourceModel\Operation as OperationResourceModel;
11+
912
/**
10-
* Class Collection
13+
* Class Collection for Magento Operation table
1114
* @codeCoverageIgnore
1215
*/
1316
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
@@ -20,9 +23,10 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
2023
protected function _construct()
2124
{
2225
$this->_init(
23-
\Magento\AsynchronousOperations\Model\Operation::class,
24-
\Magento\AsynchronousOperations\Model\ResourceModel\Operation::class
26+
Operation::class,
27+
OperationResourceModel::class
2528
);
2629
$this->setMainTable('magento_operation');
30+
$this->_setIdFieldName(OperationResourceModel::TABLE_PRIMARY_KEY);
2731
}
2832
}

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProducRelatedProductsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductRelatedProductsSection">
1212
<element name="relatedProductsActionsHeaderText" type="text" selector=".block.related .block-actions" />
13+
<element name="relatedProductsActionsHeaderBtn" type="text" selector=".block.related .block-actions button" />
1314
<element name="relatedProductsListSectionText" type="text" selector=".block.related .products.wrapper.grid.products-grid.products-related" />
1415
<element name="relatedProductName" type="button" selector="//*[@class='block related']//a[contains(text(), '{{productName}}')]" parameterized="true"/>
1516
<element name="relatedProductCheckBoxButton" type="button" selector="//*[@class='block related']//a[contains(text(), '{{productName}}')]/parent::*/parent::*//input[@class='checkbox related']" parameterized="true"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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="StorefrontVerifyProductAfterPartialReindexOnSeveralWebsitesTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Product Categories Indexer"/>
15+
<title value="Verify Cron Partial Reindex for Products assigned to Categories and several new websites."/>
16+
<description value="Verify that Merchant Developer can use console commands to perform partial reindex for Category Products, Product Categories, and Product Price."/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-3215"/>
19+
<useCaseId value="ACP2E-789"/>
20+
<group value="catalog"/>
21+
<group value="indexer"/>
22+
</annotations>
23+
<before>
24+
<!-- Change indexers to "Update by Schedule" mode -->
25+
<magentoCLI command="indexer:set-mode schedule" stepKey="setScheduleIndexer"/>
26+
27+
<!-- Login as Admin -->
28+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
29+
30+
<!-- Create website, store group, store to assign to new product -->
31+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
32+
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
33+
<argument name="websiteCode" value="{{customWebsite.code}}"/>
34+
</actionGroup>
35+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
36+
<argument name="website" value="{{customWebsite.name}}"/>
37+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
38+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
39+
</actionGroup>
40+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView">
41+
<argument name="StoreGroup" value="customStoreGroup"/>
42+
<argument name="customStore" value="customStore"/>
43+
</actionGroup>
44+
45+
<createData entity="_defaultCategory" stepKey="createCategory"/>
46+
<createData entity="_defaultProduct" stepKey="productAssignedToCustomWebsite">
47+
<requiredEntity createDataKey="createCategory"/>
48+
</createData>
49+
<createData entity="SimpleProduct" stepKey="productAssignedToMainWebsite">
50+
<requiredEntity createDataKey="createCategory"/>
51+
</createData>
52+
<actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
53+
<magentoCLI command="cache:clean" stepKey="cleanCacheBefore"/>
54+
</before>
55+
<after>
56+
<!-- Change indexers to "Update on Save" mode -->
57+
<magentoCLI command="indexer:set-mode realtime" stepKey="setRealtimeMode"/>
58+
59+
<!-- Delete data -->
60+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
61+
<deleteData createDataKey="productAssignedToCustomWebsite" stepKey="deleteProductAssignedToCustomWebsite"/>
62+
<deleteData createDataKey="productAssignedToMainWebsite" stepKey="deleteProductAssignedToMainWebsite"/>
63+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteTestWebsite">
64+
<argument name="websiteName" value="{{customWebsite.name}}"/>
65+
</actionGroup>
66+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToProductCatalogPage"/>
67+
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
68+
<actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/>
69+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
70+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
71+
<magentoCLI command="cache:clean" stepKey="cleanCacheAfter"/>
72+
</after>
73+
74+
<!-- Open storefront on second store -->
75+
<amOnPage url="{{StorefrontStoreHomePage.url(customStore.code)}}" stepKey="openStorefrontPage"/>
76+
<waitForPageLoad time="30" stepKey="waitStorefrontPage"/>
77+
78+
<!-- Check product is not present in category before cron run -->
79+
<actionGroup ref="AssertStorefrontProductAbsentOnCategoryPageActionGroup" stepKey="doNotSeeProductInCategoryPage">
80+
<argument name="categoryUrlKey" value="$$createCategory.name$$"/>
81+
<argument name="productName" value="{{_defaultProduct.name}}"/>
82+
</actionGroup>
83+
84+
<!-- Run cron -->
85+
<magentoCLI command="cron:run" stepKey="runCron"/>
86+
87+
<!-- Check product is present in category after cron run -->
88+
<actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">
89+
<argument name="category" value="$$createCategory$$"/>
90+
<argument name="product" value="_defaultProduct"/>
91+
</actionGroup>
92+
</test>
93+
</tests>

app/code/Magento/Catalog/etc/mview.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<table name="catalog_product_entity_int" entity_column="entity_id" />
5151
<table name="catalog_product_entity_tier_price" entity_column="entity_id" />
5252
<table name="catalog_product_link" entity_column="product_id" />
53+
<table name="catalog_product_website" entity_column="product_id" />
5354
</subscriptions>
5455
</view>
5556
<view id="catalog_product_attribute" class="Magento\Catalog\Model\Indexer\Product\Eav" group="indexer">
Loading

app/code/Magento/Catalog/view/frontend/web/js/related-products.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ define([
5151
this.options.selectAllMessage : this.options.unselectAllMessage;
5252

5353
$(e.target).html(innerHTML);
54-
$(this.options.relatedCheckbox).attr(
54+
$(this.options.relatedCheckbox + ':visible').attr(
5555
'checked',
5656
this.options.relatedProductsCheckFlag = !this.options.relatedProductsCheckFlag
5757
);

0 commit comments

Comments
 (0)