diff --git a/app/code/Magento/AwsS3/Driver/AwsS3.php b/app/code/Magento/AwsS3/Driver/AwsS3.php index 76e3e2fc333f8..02c7e94de448c 100644 --- a/app/code/Magento/AwsS3/Driver/AwsS3.php +++ b/app/code/Magento/AwsS3/Driver/AwsS3.php @@ -527,6 +527,10 @@ public function getRealPath($path) */ public function rename($oldPath, $newPath, DriverInterface $targetDriver = null): bool { + if ($oldPath === $newPath) { + return true; + } + try { $this->adapter->move( $this->normalizeRelativePath($oldPath, true), diff --git a/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php b/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php index 31c7f86e66748..811f3567f86a7 100644 --- a/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php +++ b/app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php @@ -496,4 +496,21 @@ public function testCreateDirectory(): void self::assertTrue($this->driver->createDirectory(self::URL . 'test/test2/')); } + + public function testRename(): void + { + $this->adapterMock->expects(self::once()) + ->method('move') + ->with('test/path', 'test/path2'); + + self::assertTrue($this->driver->rename('test/path', 'test/path2')); + } + + public function testRenameSameDestination(): void + { + $this->adapterMock->expects(self::never()) + ->method('move'); + + self::assertTrue($this->driver->rename('test/path', 'test/path')); + } } diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml index ceed14e76fb4b..cbba284859697 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml @@ -40,8 +40,11 @@ - - + + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml index 916caf2e9a177..d7d053c3e1f54 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml @@ -40,7 +40,10 @@ - + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml index 34cf435efe745..2f7dd14d1d712 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml @@ -31,7 +31,11 @@ - + + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml index 133a8bf66bb6a..a7d41069a4d96 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminFilterProductListByBundleProductTest.xml @@ -31,7 +31,11 @@ - + + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml index b83a6ac649e7b..30397d8473550 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductFixedPricingTest.xml @@ -39,7 +39,10 @@ - + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml index 0b4620d614fc1..381f265f6d8bf 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceInCartTest.xml @@ -36,7 +36,10 @@ - + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceWithFixedAndPercentOptionsInCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceWithFixedAndPercentOptionsInCartTest.xml index e0bd46f751abb..ddea67a8a3e01 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceWithFixedAndPercentOptionsInCartTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/BundleProductWithTierPriceWithFixedAndPercentOptionsInCartTest.xml @@ -41,7 +41,10 @@ - + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml index 3e723e5a8f668..eb047822cd230 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/CurrencyChangingBundleProductInCartTest.xml @@ -45,7 +45,10 @@ - + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml index 7fd2d52961e2a..753d6f9655075 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml @@ -37,7 +37,10 @@ - + + + + @@ -76,7 +79,10 @@ - + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml index 28f091a08b630..dc1beea6609ef 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductDetailsTest.xml @@ -37,7 +37,10 @@ - + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml index fcbdb53a3f328..918e6014dbb97 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleProductShownInCategoryListAndGridTest.xml @@ -42,9 +42,12 @@ - + + + + - + @@ -67,7 +70,7 @@ - + @@ -79,7 +82,7 @@ - + diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml index 94505e21a4b67..31e8ff339112a 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontGoToDetailsPageWhenAddingToCartTest.xml @@ -36,7 +36,10 @@ - + + + + diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php index 1bbdf1b315cd0..276a62062a010 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php @@ -591,7 +591,10 @@ protected function _prepareOptions(\Magento\Framework\DataObject $buyRequest, $p if ($product->getSkipCheckRequiredOption() !== true) { $group->validateUserValue($optionsFromRequest); - } elseif ($optionsFromRequest !== null && isset($optionsFromRequest[$option->getId()])) { + } elseif ($optionsFromRequest !== null + && isset($optionsFromRequest[$option->getId()]) + && $optionsFromRequest[$option->getId()] !== '' + ) { if (is_array($optionsFromRequest[$option->getId()])) { $group->validateUserValue($optionsFromRequest); } else { diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateAttributeTextSwatchNthValueActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateAttributeTextSwatchNthValueActionGroup.xml new file mode 100644 index 0000000000000..4bac73a3a9431 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateAttributeTextSwatchNthValueActionGroup.xml @@ -0,0 +1,33 @@ + + + + + + + Fills in the Text swatch Field. + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateAttributeVisualSwatchNthValueActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateAttributeVisualSwatchNthValueActionGroup.xml new file mode 100644 index 0000000000000..a7d326fc5cac1 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateAttributeVisualSwatchNthValueActionGroup.xml @@ -0,0 +1,30 @@ + + + + + + + Fills in the visual swatch Field. + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml index 51658dca78c6a..93bc62f3d7d02 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml @@ -321,6 +321,22 @@ opt3Admin opt3Front + + swatch_visual + Visual Swatch + No + opt1Admin + opt1Front + + + text_visual + Text Swatch + No + opt1swatch + opt1store + opt1SwatchAdmin + opt1Admin + select Dropdown diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateNewProductAttributeSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateNewProductAttributeSection.xml index 447fb186d3a7c..bf6912db916a9 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateNewProductAttributeSection.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateNewProductAttributeSection.xml @@ -30,5 +30,11 @@ + + + + + + diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml index e3fa3dada5b22..f5cf4cd3f2417 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAssignProductAttributeToAttributeSetTest.xml @@ -52,8 +52,10 @@ - - + + + + diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeTextSwatchFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeTextSwatchFromProductPageTest.xml new file mode 100644 index 0000000000000..7a087f02a3fff --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeTextSwatchFromProductPageTest.xml @@ -0,0 +1,57 @@ + + + + + + + + + <description value="Admin should be able to create a Text swatch product attribute from product page"/> + <severity value="BLOCKER"/> + <testCaseId value="MC-42510"/> + <group value="Catalog"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + + <after> + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> + <argument name="ProductAttribute" value="{{textSwatchProductAttribute.attribute_code}}"/> + </actionGroup> + <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> + <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> + <waitForPageLoad stepKey="waitForDeletion"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!-- Open Product Index Page and open Create product attribute Page--> + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPage"/> + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"/> + + <!-- Create product attribute--> + <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickAddAttributeBtn"/> + <waitForText userInput="Select Attribute" stepKey="checkNewAttributePopUpAppeared"/> + <click selector="{{AdminProductFormAttributeSection.createNewAttribute}}" stepKey="clickCreateNewAttribute"/> + <waitForElementVisible selector="{{AdminProductFormNewAttributeSection.attributeLabel}}" stepKey="waitForAttrLabel" /> + <fillField selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" userInput="{{textSwatchProductAttribute.attribute_code}}" stepKey="fillAttributeLabel"/> + <selectOption selector="{{AdminCreateNewProductAttributeSection.inputType}}" userInput="{{textSwatchProductAttribute.frontend_input}}" stepKey="selectTextField"/> + <actionGroup ref="AdminCreateAttributeTextSwatchNthValueActionGroup" stepKey="createValue"> + <argument name="row" value="0"/> + <argument name="swatchNameStore" value="{{textSwatchProductAttribute.swatchStore}}"/> + <argument name="storeName" value="{{textSwatchProductAttribute.store}}"/> + <argument name="swatchNameAdmin" value="{{textSwatchProductAttribute.SwatchAdmin}}"/> + <argument name="adminName" value="{{textSwatchProductAttribute.admin}}"/> + </actionGroup> + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> + <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/> + <waitForPageLoad stepKey="waitForAttributeToSave"/> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeVisualSwatchFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeVisualSwatchFromProductPageTest.xml new file mode 100644 index 0000000000000..686f8aa865c22 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeVisualSwatchFromProductPageTest.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + /** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> + <test name="AdminCreateProductAttributeVisualSwatchFromProductPageTest"> + <annotations> + <features value="Catalog"/> + <stories value="Create Product Attributes"/> + <title value="Admin should be able to create a Visual swatch product attribute from product page"/> + <description value="Admin should be able to create a Visual swatch product attribute from product page"/> + <severity value="BLOCKER"/> + <testCaseId value="MC-42510"/> + <group value="Catalog"/> + </annotations> + + <before> + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> + </before> + + <after> + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> + <argument name="ProductAttribute" value="{{visualSwatchProductAttribute.attribute_code}}"/> + </actionGroup> + <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> + <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> + <waitForPageLoad stepKey="waitForDeletion"/> + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> + </after> + + <!-- Open Product Index Page and open Create product attribute Page--> + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPage"/> + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"/> + + <!-- Create product attribute--> + <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickAddAttributeBtn"/> + <waitForText userInput="Select Attribute" stepKey="checkNewAttributePopUpAppeared"/> + <click selector="{{AdminProductFormAttributeSection.createNewAttribute}}" stepKey="clickCreateNewAttribute"/> + <waitForElementVisible selector="{{AdminProductFormNewAttributeSection.attributeLabel}}" stepKey="waitForAttrLabel" /> + <fillField selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" userInput="{{visualSwatchProductAttribute.attribute_code}}" stepKey="fillAttributeLabel"/> + <selectOption selector="{{AdminCreateNewProductAttributeSection.inputType}}" userInput="{{visualSwatchProductAttribute.frontend_input}}" stepKey="selectTextField"/> + <actionGroup ref="AdminCreateAttributeVisualSwatchNthValueActionGroup" stepKey="createValue"> + <argument name="row" value="0"></argument> + <argument name="adminName" value="{{visualSwatchProductAttribute.option1_admin}}"></argument> + <argument name="storeName" value="{{visualSwatchProductAttribute.option1_store}}"></argument> + </actionGroup> + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> + <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/> + <waitForPageLoad stepKey="waitForAttributeToSave"/> + </test> +</tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml index c8d6dc40da67a..d129ad3a04d0f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml @@ -53,8 +53,10 @@ <click selector="{{AdminProductAttributeSetSection.saveBtn}}" stepKey="clickSave2"/> <!-- Go to new product page and see a default attribute --> - <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToNewProductPage"/> - <waitForPageLoad stepKey="wait2"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToNewProductPage"> + <argument name="attributeSetId" value="4"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait2"/> <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="expandSEOSection"/> <seeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('meta_keyword')}}" stepKey="seeMetaKeyword"/> <dontSeeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('testgroupname')}}" stepKey="dontSeeTestGroupName"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml index 167fdc9294e14..19fd3e2ad7226 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceForGeneralGroupTest.xml @@ -37,7 +37,10 @@ </after> <!-- Create virtual product--> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId,'virtual')}}" stepKey="openVirtualProductCreatePage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="openVirtualProductCreatePage"> + <argument name="attributeSetId" value="{{AddToDefaultSet.attributeSetId}}"/> + <argument name="productType" value="virtual"/> + </actionGroup> <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillNewProductData"> <argument name="product" value="virtualProductGeneralGroup"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml index 8b1f946834659..83e9a70ad285f 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminEditTextEditorProductAttributeTest.xml @@ -36,8 +36,10 @@ <dontSeeElement selector="{{StorefrontPropertiesSection.EnableWYSIWYG}}" stepKey="dontSeeWYSIWYGEnableField1" /> <click selector="{{AttributePropertiesSection.Save}}" stepKey="saveAttribute1" /> <waitForPageLoad stepKey="waitForPageLoad3" /> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/> - <waitForPageLoad stepKey="waitForPageLoad4"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToNewProduct"> + <argument name="attributeSetId" value="{{AddToDefaultSet.attributeSetId}}"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad4"/> <fillField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/> <fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/> <fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml index 5fe71ce0a1e5d..bb6098f55cf96 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml @@ -64,8 +64,10 @@ <!-- Clear cache --> <actionGroup ref="ClearPageCacheActionGroup" stepKey="clearPageCacheActionGroup"/> <!-- Go to create new product page --> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/> - <waitForPageLoad stepKey="wait2"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToNewProduct"> + <argument name="attributeSetId" value="{{AddToDefaultSet.attributeSetId}}"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait2"/> <!-- Assert attribute not present in product creation --> <dontSeeElement selector="{{AdminProductFormSection.attributeLabelByText($$attribute.attribute[frontend_labels][0][label]$$)}}" stepKey="seeLabel"/> <!-- Assert removed attribute not presence in storefront product additional information --> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml index 25dc4916e7ccd..669e5cd040c5e 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockUnassignFromCategoryTest.xml @@ -44,22 +44,28 @@ <!-- Update simple product by unselecting categories --> <scrollTo selector="{{AdminProductFormSection.productStockStatus}}" stepKey="scroll"/> - <click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="clickCategoriesDropDown"/> - <click selector="{{AdminProductFormSection.unselectCategories($$initialCategoryEntity.name$$)}}" stepKey="unselectCategories"/> - <actionGroup ref="AdminSubmitCategoriesPopupActionGroup" stepKey="clickOnDoneAdvancedCategory"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickCategoriesDropDown"/> + <actionGroup ref="RemoveCategoryFromProductActionGroup" stepKey="unselectCategories"> + <argument name="categoryName" value="$$initialCategoryEntity.name$$"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickOnDoneAdvancedCategory"/> <scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/> <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/> <!-- Verify customer see success message --> - <see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/> + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeAssertSimpleProductSaveSuccessMessage"> + <argument name="message" value="You saved the product."/> + </actionGroup> <!--Search default simple product in the grid page --> <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="OpenCategoryCatalogPage"/> <actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickExpandTree"/> - <click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$initialCategoryEntity.name$$)}}" stepKey="selectCategory"/> - <waitForPageLoad stepKey="waitForPageToLoad"/> - <click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="clickAdminCategoryProductSection"/> - <waitForPageLoad stepKey="waitForSectionHeaderToLoad"/> + <actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory"> + <argument name="category" value="$$initialCategoryEntity$$"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/> + <actionGroup ref="AdminCategoryPageOpenProductsInCategorySectionActionGroup" stepKey="clickAdminCategoryProductSection"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSectionHeaderToLoad"/> <dontSee selector="{{AdminCategoryProductsGridSection.rowProductName($$initialSimpleProduct.name$$)}}" stepKey="dontSeeProductNameOnCategoryCatalogPage"/> </test> </tests> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml index 45489e2233fdd..87dfca735cc0a 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml @@ -61,7 +61,9 @@ <seeInField stepKey="assertDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueDate}}" userInput="{$generateDateCompressedFormat}"/> <!--Go to New Product page, add Attribute and check values--> - <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateSimpleProductPage"> + <argument name="attributeSetId" value="4"/> + </actionGroup> <actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> <argument name="attributeCode" value="{{dateProductAttribute.attribute_code}}"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml index e622931612733..22a4d2f66ee06 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownTest.xml @@ -85,7 +85,9 @@ <seeCheckboxIsChecked stepKey="seeOption3Default" selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault('3')}}"/> <!--Go to New Product page, add Attribute and check dropdown values--> - <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateSimpleProductPage"> + <argument name="attributeSetId" value="4"/> + </actionGroup> <actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> <argument name="attributeCode" value="{{dropdownProductAttribute.attribute_code}}"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml index b06ca836c7d0e..b756df331d0c5 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDropdownWithSingleQuoteTest.xml @@ -69,7 +69,9 @@ <seeCheckboxIsChecked stepKey="seeOption1Default" selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault('1')}}"/> <!--Go to New Product page, add Attribute and check dropdown values--> - <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateSimpleProductPage"> + <argument name="attributeSetId" value="4"/> + </actionGroup> <actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> <argument name="attributeCode" value="{{dropdownProductAttributeWithQuote.attribute_code}}"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml index 0ce93f5353c18..72d3fa04591c2 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityMultiSelectTest.xml @@ -84,7 +84,9 @@ <seeCheckboxIsChecked stepKey="seeOption3Default" selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault('3')}}"/> <!--Go to New Product page, add Attribute and check multiselect values--> - <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateSimpleProductPage"> + <argument name="attributeSetId" value="4"/> + </actionGroup> <actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> <argument name="attributeCode" value="{{multiselectProductAttribute.attribute_code}}"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml index dae3a089e1514..c7b9613e1ee48 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityPriceTest.xml @@ -55,7 +55,9 @@ <seeInField stepKey="assertAttrCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{priceProductAttribute.attribute_code}}"/> <!--Go to New Product page, add Attribute and check values--> - <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateSimpleProductPage"> + <argument name="attributeSetId" value="4"/> + </actionGroup> <actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> <argument name="attributeCode" value="{{priceProductAttribute.attribute_code}}"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml index 5eccf451c31b6..629d084b2617c 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityTextFieldTest.xml @@ -56,7 +56,9 @@ <seeInField stepKey="assertDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueText}}" userInput="{{textProductAttribute.default_value}}"/> <!--Go to New Product page, add Attribute and check values--> - <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateSimpleProductPage"> + <argument name="attributeSetId" value="4"/> + </actionGroup> <actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> <argument name="attributeCode" value="{{textProductAttribute.attribute_code}}"/> </actionGroup> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifyDefaultWYSIWYGToolbarOnProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifyDefaultWYSIWYGToolbarOnProductTest.xml index 4c285fe48315d..4bf4098607337 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifyDefaultWYSIWYGToolbarOnProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifyDefaultWYSIWYGToolbarOnProductTest.xml @@ -22,8 +22,10 @@ <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE"/> </before> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToProduct"/> - <waitForPageLoad stepKey="wait"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToProduct"> + <argument name="attributeSetId" value="{{AddToDefaultSet.attributeSetId}}"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/> <scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToQty"/> <click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab"/> <waitForElementVisible selector="{{ProductDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitforTinyMCEVisible1"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifydefaultcontrolsonproductshortdescriptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifydefaultcontrolsonproductshortdescriptionTest.xml index a2e820f5ba45a..e6b1f0cc079c0 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifydefaultcontrolsonproductshortdescriptionTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyDefaultWYSIWYGToolbarOnProductTest/VerifydefaultcontrolsonproductshortdescriptionTest.xml @@ -23,8 +23,10 @@ <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE"/> </before> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToProduct"/> - <waitForPageLoad stepKey="wait"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToProduct"> + <argument name="attributeSetId" value="{{AddToDefaultSet.attributeSetId}}"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/> <scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToQty"/> <click selector="{{AdminProductFormSection.contentTab}}" stepKey="clickContentTab"/> <waitForElementVisible selector="{{ProductShortDescriptionWysiwygSection.form}} {{TinyMCESection.TinyMCE}}" stepKey="waitforTinyMCEVisible2"/> diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnProductTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnProductTest.xml index 403a417daed06..66f0854d13dd3 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnProductTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyTinyMCEIsNativeWYSIWYGOnProductTest.xml @@ -22,8 +22,10 @@ <actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> <actionGroup ref="CliEnableTinyMCEActionGroup" stepKey="enableTinyMCE" /> </before> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/> - <waitForPageLoad stepKey="wait1"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToNewProduct"> + <argument name="attributeSetId" value="{{AddToDefaultSet.attributeSetId}}"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait1"/> <fillField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/> <fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/> <fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/> diff --git a/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image.html b/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image.html index cf76762b1ff58..b73ba44eaea79 100644 --- a/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image.html +++ b/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image.html @@ -9,6 +9,7 @@ attr="href: $row().url"> <img if="imageExists($row())" class="product-image-photo" + loading="lazy" attr="src: getImageUrl($row()), alt: getLabel($row()), title: getLabel($row()), diff --git a/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image_with_borders.html b/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image_with_borders.html index 68b7f4e386896..8ece510a74045 100644 --- a/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image_with_borders.html +++ b/app/code/Magento/Catalog/view/base/web/template/product/list/columns/image_with_borders.html @@ -13,6 +13,7 @@ <span class="product-image-wrapper" data-bind="style: {'padding-bottom': getHeight($row())/getWidth($row()) * 100 + '%'}"> <img class="product-image-photo" + loading="lazy" data-bind="attr: {src: getImageUrl($row()), alt: getLabel($row()), title: getLabel($row())}" /> </span> diff --git a/app/code/Magento/Catalog/view/frontend/web/template/product/image.html b/app/code/Magento/Catalog/view/frontend/web/template/product/image.html index dd9668cd16eed..c8b882a528145 100644 --- a/app/code/Magento/Catalog/view/frontend/web/template/product/image.html +++ b/app/code/Magento/Catalog/view/frontend/web/template/product/image.html @@ -4,4 +4,4 @@ * See COPYING.txt for license details. */ --> -<img class="photo image" data-bind="attr: {src: src, alt: alt}, style: {width: width + 'px', height: height + 'px'}" /> +<img class="photo image" loading="lazy" data-bind="attr: {src: src, alt: alt}, style: {width: width + 'px', height: height + 'px'}" /> diff --git a/app/code/Magento/Catalog/view/frontend/web/template/product/image_with_borders.html b/app/code/Magento/Catalog/view/frontend/web/template/product/image_with_borders.html index c4e71356d46eb..3be04fab9e462 100644 --- a/app/code/Magento/Catalog/view/frontend/web/template/product/image_with_borders.html +++ b/app/code/Magento/Catalog/view/frontend/web/template/product/image_with_borders.html @@ -5,7 +5,7 @@ */ --> <span class="product-image-container" data-bind="style: {width: width/2 + 'px'}"> - <span class="product-image-wrapper" data-bind="style: {'padding-bottom': height/width*100 + '%'}"> - <img class="product-image-photo" data-bind="attr: {src: src, alt: alt}, style: {width: 'auto', height: 'auto'}" /> + <span class="product-image-wrapper" data-bind="style: {'padding-bottom': height/width*100 + '%'}"> + <img class="product-image-photo" loading="lazy" data-bind="attr: {src: src, alt: alt}, style: {width: 'auto', height: 'auto'}" /> </span> </span> diff --git a/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html b/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html index fa32ea1b212ae..f98968e104b04 100644 --- a/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html +++ b/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html @@ -8,6 +8,6 @@ data-bind="attr: {'style': 'height: ' + getHeight($parents[1])/2 + 'px; width: ' + getWidth($parents[1])/2 + 'px;' }"> <span class="product-image-wrapper"> <img - data-bind="attr: {'src': getSrc($parents[1]), 'width': getWidth($parents[1]), 'height': getHeight($parents[1]), 'alt': getAlt($parents[1]), 'title': getAlt($parents[1]) }"/> + data-bind="attr: {'src': getSrc($parents[1]), 'width': getWidth($parents[1]), 'height': getHeight($parents[1]), 'alt': getAlt($parents[1]), 'title': getAlt($parents[1]) }" loading="lazy"/> </span> </span> diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml index 60079b55fd0e1..68d60dfa90e65 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml @@ -60,8 +60,11 @@ </after> <!--Create a configurable product with long name and sku--> - <amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'configurable')}}" stepKey="goToProductCreatePage"/> - <waitForPageLoad stepKey="waitForProductCreatePage"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToProductCreatePage"> + <argument name="attributeSetId" value="{{AddToDefaultSet.attributeSetId}}"/> + <argument name="productType" value="configurable"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductCreatePage"/> <fillField selector="{{AdminProductFormSection.productName}}" userInput="{{ProductWithLongNameSku.name}}" stepKey="fillProductName"/> <fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{ProductWithLongNameSku.sku}}" stepKey="fillProductSku"/> <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{ProductWithLongNameSku.price}}" stepKey="fillProductPrice"/> diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml index 3e97d91311935..c5a6545c3c84b 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedConfigurableProductOnOrderPageTest.xml @@ -91,8 +91,10 @@ </actionGroup> <!-- Go to created product page --> - <amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> - <waitForPageLoad stepKey="waitForProductPageLoad"/> + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToProductPage"> + <argument name="productUrl" value="$$createConfigProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductPageLoad"/> <selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption.value$$" stepKey="selectOption"/> <!-- Search and open customer --> @@ -103,13 +105,15 @@ <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickEditButton"/> <!-- Click create order --> - <click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/> - <waitForPageLoad stepKey="waitForPageLoad"/> + <actionGroup ref="AdminClickCreateOrderButtonOnEditCustomerPageActionGroup" stepKey="clickCreateOrder"/> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad"/> <conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/> <waitForPageLoad stepKey="waitForPageLoad2"/> <!-- Add configure to product --> - <click selector="{{AdminCustomerActivitiesRecentlyViewedSection.addToOrderConfigure($$createConfigProduct.name$$)}}" stepKey="configureProduct"/> + <actionGroup ref="AdminClickConfigureForRecentlyViewedProductActionGroup" stepKey="configureProduct"> + <argument name="productName" value="$$createConfigProduct.name$$"/> + </actionGroup> <selectOption selector="{{AdminCustomerActivitiesConfigureSection.addAttribute}}" userInput="$$getConfigAttributeOption.value$$" stepKey="selectProductOption"/> <click selector="{{AdminCustomerActivitiesConfigureSection.okButton}}" stepKey="clickOkBtn"/> <waitForPageLoad stepKey="waitForProductConfigureLoad"/> @@ -118,7 +122,15 @@ <actionGroup ref="AdminClickUpdateChangesOnCreateOrderPageActionGroup" stepKey="clickUpdateChangesBtn"/> <!-- Assert products in items ordered grid --> - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Product')}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductName"/> - <see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Price')}}" userInput="$123.00" stepKey="seeProductPrice"/> + <actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductName"> + <argument name="index" value="1"/> + <argument name="attribute" value="Product"/> + <argument name="value" value="$$createConfigProduct.name$$"/> + </actionGroup> + <actionGroup ref="AdminAssertProductInItemsOrderedGridOnCreateOrderPageActionGroup" stepKey="seeProductPrice"> + <argument name="index" value="1"/> + <argument name="attribute" value="Price"/> + <argument name="value" value="$123.00"/> + </actionGroup> </test> </tests> diff --git a/app/code/Magento/Security/etc/adminhtml/system.xml b/app/code/Magento/Security/etc/adminhtml/system.xml index 18753facb19cf..a31e1b1949b1a 100644 --- a/app/code/Magento/Security/etc/adminhtml/system.xml +++ b/app/code/Magento/Security/etc/adminhtml/system.xml @@ -9,16 +9,16 @@ <system> <section id="admin"> <group id="security"> - <field id="admin_account_sharing" translate="label comment" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <field id="admin_account_sharing" translate="label comment" type="select" sortOrder="5" showInDefault="1" canRestore="1"> <label>Admin Account Sharing</label> <comment>If set to Yes, you can log in from multiple computers into same account. Default setting No improves security.</comment> <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> </field> - <field id="password_reset_protection_type" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <field id="password_reset_protection_type" translate="label" type="select" sortOrder="6" showInDefault="1" canRestore="1"> <label>Password Reset Protection Type</label> <source_model>Magento\Security\Model\Config\Source\ResetMethod</source_model> </field> - <field id="max_number_password_reset_requests" translate="label comment" type="text" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <field id="max_number_password_reset_requests" translate="label comment" type="text" sortOrder="7" showInDefault="1" canRestore="1"> <label>Max Number of Password Reset Requests</label> <comment>Limit the number of password reset request per hour. Use 0 to disable.</comment> <validate>required-entry validate-zero-or-greater validate-digits</validate> @@ -26,7 +26,7 @@ <field id="password_reset_protection_type" separator="," negative="1">0</field> </depends> </field> - <field id="min_time_between_password_reset_requests" translate="label comment" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> + <field id="min_time_between_password_reset_requests" translate="label comment" type="text" sortOrder="8" showInDefault="1" canRestore="1"> <label>Min Time Between Password Reset Requests</label> <comment>Delay in minutes between password reset requests. Use 0 to disable.</comment> <validate>required-entry validate-zero-or-greater validate-digits</validate> diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml index 04dd3ac1f30f9..0f65cf98b8abf 100644 --- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml +++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminCreateImageSwatchTest.xml @@ -112,7 +112,10 @@ </assertStringContainsString> <!-- Create a configurable product to verify the storefront with --> - <amOnPage url="{{AdminProductCreatePage.url(BaseConfigurableProduct.attribute_set_id, BaseConfigurableProduct.type_id)}}" stepKey="goToCreateConfigurableProduct"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToCreateConfigurableProduct"> + <argument name="attributeSetId" value="{{BaseConfigurableProduct.attribute_set_id}}"/> + <argument name="productType" value="{{BaseConfigurableProduct.type_id}}"/> + </actionGroup> <actionGroup ref="FillMainProductFormActionGroup" stepKey="fillProductForm"> <argument name="product" value="BaseConfigurableProduct"/> </actionGroup> diff --git a/app/code/Magento/Swatches/view/adminhtml/ui_component/product_attribute_add_form.xml b/app/code/Magento/Swatches/view/adminhtml/ui_component/product_attribute_add_form.xml index 2fdf5f3cd0ea9..614102ee9a457 100644 --- a/app/code/Magento/Swatches/view/adminhtml/ui_component/product_attribute_add_form.xml +++ b/app/code/Magento/Swatches/view/adminhtml/ui_component/product_attribute_add_form.xml @@ -170,6 +170,10 @@ <settings> <dataType>text</dataType> <label translate="true">Admin</label> + <required>true</required> + <validation> + <rule name="required-entry" xsi:type="boolean">true</rule> + </validation> </settings> </field> <field name="position" component="Magento_Catalog/js/form/element/input" formElement="input"> @@ -292,6 +296,10 @@ <settings> <dataType>text</dataType> <label translate="true">Admin</label> + <required>true</required> + <validation> + <rule name="required-entry" xsi:type="boolean">true</rule> + </validation> </settings> </field> <field name="position" component="Magento_Catalog/js/form/element/input" formElement="input"> diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/thumbnail.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/thumbnail.html index e2f0eabe58f42..00557356e93f2 100644 --- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/thumbnail.html +++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/thumbnail.html @@ -4,4 +4,4 @@ * See COPYING.txt for license details. */ --> -<img class="admin__control-thumbnail" style="max-height: 75px; max-width: 75px;" data-bind="attr: {src: $data.value}"/> +<img class="admin__control-thumbnail" style="max-height: 75px; max-width: 75px;" data-bind="attr: {src: $data.value}" loading="lazy"/> diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html b/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html index 25f26813d6eaa..d8dbabdaf210a 100644 --- a/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html +++ b/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html @@ -6,6 +6,6 @@ --> <span class="thumbnail-container"> <span class="thumbnail-wrapper"> - <img class="admin__control-thumbnail" attr="src: $col.getSrc($row()), alt: $col.getAlt($row())"/> + <img class="admin__control-thumbnail" attr="src: $col.getSrc($row()), alt: $col.getAlt($row())" loading="lazy"/> </span> </span> diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail/preview.html b/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail/preview.html index b14a423dd8273..ae71487c8087d 100644 --- a/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail/preview.html +++ b/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail/preview.html @@ -7,7 +7,7 @@ <div class="thumbnail-preview" data-role="thumbnail-preview"> <div class="thumbnail-preview-image-block"> - <img class="thumbnail-preview-image" src="<%- src %>" alt="<%- alt %>" /> + <img class="thumbnail-preview-image" src="<%- src %>" alt="<%- alt %>" loading="lazy"/> </div> <div class="thumbnail-preview-content"> <a class="thumbnail-preview-link" href="<%- link %>"><%- linkText %></a> diff --git a/app/code/Magento/Webapi/etc/acl.xml b/app/code/Magento/Webapi/etc/acl.xml new file mode 100644 index 0000000000000..3222d8d063cc8 --- /dev/null +++ b/app/code/Magento/Webapi/etc/acl.xml @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © Magento, Inc. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> + <acl> + <resources> + <resource id="Magento_Backend::admin"> + <resource id="Magento_Backend::stores"> + <resource id="Magento_Backend::stores_settings"> + <resource id="Magento_Config::config"> + <resource id="Magento_Webapi::config_webapi" title="Magento Web API" translate="title" + sortOrder="20"/> + </resource> + </resource> + </resource> + </resource> + </resources> + </acl> +</config> diff --git a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontBundleWithTwoOptionsWithWeeeAddToCartTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontBundleWithTwoOptionsWithWeeeAddToCartTest.xml index 82f5d7380bc9b..6997500250138 100644 --- a/app/code/Magento/Weee/Test/Mftf/Test/StorefrontBundleWithTwoOptionsWithWeeeAddToCartTest.xml +++ b/app/code/Magento/Weee/Test/Mftf/Test/StorefrontBundleWithTwoOptionsWithWeeeAddToCartTest.xml @@ -82,8 +82,11 @@ </actionGroup> <actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct2"/> - <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/> - <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/> + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage"> + <argument name="attributeSetId" value="{{BundleProduct.set}}"/> + <argument name="productType" value="{{BundleProduct.type}}"/> + </actionGroup> + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad"/> <actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields"> <argument name="product" value="BundleProduct"/>