Skip to content

Commit 4aa2f11

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop daily delivery
Accepted Community Pull Requests: - #30074: add action group for AdminAdobeStockInsertRenditionImageFromGalleryFileSizeTest (by @engcom-Golf) - #30042: #1827: Improve AdminMediaGalleryUploadCategoryImageTest (by @joweecaquicla) - #29834: [MFTF] removed redundant action group (by @Usik2203) - #29962: [MFTF] Add AdminClickInvoiceButtonIntoOrderActionGroup (by @Usik2203) - #29931: [MFTF] add new AdminOpenCatalogProductPageActionGroup (by @Usik2203) - #29835: [MFTF] use action group to go to customer account (by @Usik2203) - #27698: [MFTF] Cancel created orders after checks on frontend (by @elevinskii) - #26470: #7720 (by @engcom-Charlie) Fixed GitHub Issues: - #29838: [Issue] [MFTF] removed redundant action group (reported by @m2-assistant[bot]) has been fixed in #29834 by @Usik2203 in 2.4-develop branch Related commits: 1. 04aefed 2. c024003 3. b3bab92 4. f164033 5. 0305290 6. 6df880a 7. 255d035 - #29982: [Issue] [WIP][MFTF] Add AdminClickInvoiceButtonIntoOrderActionGroup (reported by @m2-assistant[bot]) has been fixed in #29962 by @Usik2203 in 2.4-develop branch Related commits: 1. 3dd3bb9 2. e406c82 3. 18ffc03 4. 5ced4ba 5. ca45436 6. 4fb0102 7. 1df23c8 - #29941: [Issue] [MFTF] add new AdminOpenCatalogProductPageActionGroup (reported by @m2-assistant[bot]) has been fixed in #29931 by @Usik2203 in 2.4-develop branch Related commits: 1. b8ce61b 2. 832bb01 3. 547f090 4. bd5b228 5. 971df44 - #29842: [Issue] [MFTF] use action group to go to customer account (reported by @m2-assistant[bot]) has been fixed in #29835 by @Usik2203 in 2.4-develop branch Related commits: 1. 18d82a3 2. 93995c8 3. 8690e43 4. 2d100fd 5. b5d1810 - #28324: [Issue] [MFTF] Cancel created orders after checks on frontend (reported by @m2-backlog[bot]) has been fixed in #27698 by @elevinskii in 2.4-develop branch Related commits: 1. 2b86774 2. 83a4f09 3. c66d517 4. 24f9954 5. fd3e813 6. 939ced0 7. 59c16ea 8. 756f2dc 9. d63b5d8 10. 8895db4 11. f2334ed 12. 14ed4b7 13. af6569f 14. da7af27 - #7720: Product Repository saves attribute values for existing product always on "Default Store Level" (reported by @itaymesh) has been fixed in #26470 by @engcom-Charlie in 2.4-develop branch Related commits: 1. 042df41 2. a039ff4 3. 13af48a 4. a5d7355 5. 8c8949d 6. 2c15517 7. 156b3c2 8. 347001f 9. 28b5d9d 10. a892a19 11. 9b9d123
2 parents 711b09c + 3b2eb0f commit 4aa2f11

File tree

65 files changed

+358
-99
lines changed

Some content is hidden

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

65 files changed

+358
-99
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)