Skip to content

Commit 002db70

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into 2.4-develop-pr87
2 parents ce3bc86 + 4aa2f11 commit 002db70

File tree

77 files changed

+535
-132
lines changed

Some content is hidden

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

77 files changed

+535
-132
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
<!-- Reset admin order filter -->
3535
<comment userInput="Reset admin order filter" stepKey="resetAdminOrderFilter"/>
3636
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilters"/>
37-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingOrderGrid"/>
3837
<magentoCLI command="config:set admin/dashboard/enable_charts 0" stepKey="setDisableChartsAsDefault"/>
3938
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
4039
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
@@ -84,8 +83,7 @@
8483
<comment userInput="Create invoice" stepKey="createInvoice"/>
8584

8685
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
87-
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
88-
<waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
86+
<actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceButton"/>
8987
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
9088
<see selector="{{AdminInvoiceTotalSection.total('Subtotal')}}" userInput="$150.00" stepKey="seeCorrectGrandTotal"/>
9189
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@
8686

8787
<!--Add another bundle option with 2 items-->
8888
<!--Go to bundle product creation page-->
89-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
90-
<waitForPageLoad stepKey="WaitForPageToLoad"/>
89+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage"/>
9190
<conditionalClick selector="{{AdminProductFiltersSection.filtersClear}}" dependentSelector="{{AdminProductFiltersSection.filtersClear}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
9291
<waitForPageLoad stepKey="WaitForClear"/>
9392
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@
5454

5555
<!--Testing that price appears correctly in admin catalog-->
5656
<!--Set filter to product name-->
57-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
58-
<waitForPageLoad stepKey="WaitForPageToLoad"/>
57+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage"/>
5958
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">
6059
<argument name="product" value="BundleProduct"/>
6160
</actionGroup>
@@ -75,8 +74,7 @@
7574

7675
<!--Testing that price appears correctly in admin catalog-->
7776
<!--Set filter to product name-->
78-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage2"/>
79-
<waitForPageLoad stepKey="WaitForPageToLoad2"/>
77+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage2"/>
8078
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName2">
8179
<argument name="product" value="BundleProduct"/>
8280
</actionGroup>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@
9696
</actionGroup>
9797

9898
<!--Filter catalog-->
99-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/>
100-
<waitForPageLoad stepKey="WaitForPageToLoad"/>
99+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage"/>
101100
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">
102101
<argument name="product" value="BundleProduct"/>
103102
</actionGroup>

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@
5858
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
5959
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
6060

61-
<!--Go to catalog deletion page-->
62-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogPage"/>
63-
<waitForPageLoad stepKey="Loading"/>
61+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogPage"/>
6462

6563
<!--Apply Name Filter-->
6664
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676

7777
<!--Testing that price appears correctly in admin catalog-->
7878
<!--Set filter to product name-->
79-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
80-
<waitForPageLoad stepKey="WaitForPageToLoad"/>
79+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage"/>
8180
<conditionalClick selector="{{AdminProductFiltersSection.filtersClear}}" dependentSelector="{{AdminProductFiltersSection.filtersClear}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
8281
<waitForPageLoad stepKey="WaitForClear"/>
8382
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
<after>
2525
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
2626
</after>
27-
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
28-
<waitForPageLoad stepKey="WaitForPageToLoad"/>
27+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage"/>
2928
<!--Selecting new bundle product-->
3029
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct">
3130
<argument name="product" value="BundleProduct"/>

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
use Magento\Framework\Exception\ValidatorException;
3131

3232
/**
33-
* Product Repository.
33+
* @inheritdoc
34+
*
3435
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3536
* @SuppressWarnings(PHPMD.TooManyFields)
3637
*/
@@ -543,7 +544,9 @@ public function save(ProductInterface $product, $saveOptions = false)
543544
if (!$ignoreLinksFlag && $ignoreLinksFlag !== null) {
544545
$productLinks = $product->getProductLinks();
545546
}
546-
$productDataArray['store_id'] = (int)$this->storeManager->getStore()->getId();
547+
if (!isset($productDataArray['store_id'])) {
548+
$productDataArray['store_id'] = (int) $this->storeManager->getStore()->getId();
549+
}
547550
$product = $this->initializeProductData($productDataArray, empty($existingProduct));
548551

549552
$this->processLinks($product, $productLinks);
@@ -735,6 +738,7 @@ private function getCollectionProcessor()
735738
{
736739
if (!$this->collectionProcessor) {
737740
$this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get(
741+
// phpstan:ignore "Class Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor not found."
738742
\Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor::class
739743
);
740744
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminOpenCatalogProductPageActionGroup">
12+
<annotations>
13+
<description>Open page with product grid.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="openCatalogProductPage"/>
17+
<waitForPageLoad stepKey="waitForPageToLoad"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/GoToProductCatalogPageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="GoToProductCatalogPageActionGroup">
11+
<actionGroup name="GoToProductCatalogPageActionGroup" deprecated="Use AdminOpenCatalogProductPageActionGroup instead.">
1212
<annotations>
1313
<description>Goes to the Admin Products grid page.</description>
1414
</annotations>

0 commit comments

Comments
 (0)