From 11195fcf2c0b67ae150ed67efe1186acd6f64ca3 Mon Sep 17 00:00:00 2001 From: eduard13 Date: Thu, 26 Mar 2020 10:01:36 +0200 Subject: [PATCH 1/8] Fixing the opening of the product from the compare block --- ...oductFromSidebarCompareListActionGroup.xml | 23 ++++++++++ ...ontRemoveProductFromCompareSidebarTest.xml | 42 +++++++++++++++++++ .../web/css/source/_module.less | 9 ++++ 3 files changed, 74 insertions(+) create mode 100644 app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml create mode 100644 app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml diff --git a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml new file mode 100644 index 0000000000000..60d99f6f82eb9 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml @@ -0,0 +1,23 @@ + + + + + + + Click on the product item from the sidebar comparing list. + + + + + + + + + + diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml new file mode 100644 index 0000000000000..8b6c7a78968cd --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml @@ -0,0 +1,42 @@ + + + + + + + + <stories value="Verify that the product isn't removed on clicking the product name"/> + <description value="Verify that the product isn't removed on clicking the product name, but it's redirected to product page"/> + <features value="Catalog"/> + <severity value="MINOR"/> + <group value="Catalog"/> + </annotations> + <before> + <createData entity="_defaultCategory" stepKey="defaultCategory"/> + <createData entity="SimpleProduct" stepKey="simpleProduct"> + <requiredEntity createDataKey="defaultCategory"/> + </createData> + </before> + <after> + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> + <deleteData createDataKey="defaultCategory" stepKey="deleteCategory1"/> + </after> + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPage"> + <argument name="category" value="$$defaultCategory$$"/> + </actionGroup> + <actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="addProductToCompareList"> + <argument name="productVar" value="$$simpleProduct$$"/> + </actionGroup> + <actionGroup ref="StorefrontClickOnProductFromSidebarCompareListActionGroup" stepKey="clickOnComparingProductLink"> + <argument name="product" value="$$simpleProduct$$"/> + </actionGroup> + <actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductPageUrl"> + <argument name="productUrl" value="$$simpleProduct.custom_attributes[url_key]$$"/> + </actionGroup> + </test> +</tests> diff --git a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less index d0b7aa1523ad6..f300b9ea52585 100644 --- a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less @@ -998,6 +998,15 @@ } } } + + .block-compare { + .action { + &.delete { + left: 0; + right: auto; + } + } + } } } From 3e18da8553e06c50a1967a1755e7e86ec6d914e1 Mon Sep 17 00:00:00 2001 From: eduard13 <e.chitoraga@atwix.com> Date: Thu, 26 Mar 2020 12:23:46 +0200 Subject: [PATCH 2/8] Fixing the opening of the product from the compare block --- .../Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml index 8b6c7a78968cd..b0f5568ae8523 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml @@ -24,7 +24,7 @@ </before> <after> <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> - <deleteData createDataKey="defaultCategory" stepKey="deleteCategory1"/> + <deleteData createDataKey="defaultCategory" stepKey="deleteCategory"/> </after> <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPage"> <argument name="category" value="$$defaultCategory$$"/> From 48b57fd979696107814f4f0e77ecfb01fc919e33 Mon Sep 17 00:00:00 2001 From: eduard13 <e.chitoraga@atwix.com> Date: Thu, 26 Mar 2020 12:29:40 +0200 Subject: [PATCH 3/8] Fixing the opening of the product from the compare block --- ...StorefrontClickOnProductFromSidebarCompareListActionGroup.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml index 60d99f6f82eb9..5b7dd3026a905 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml @@ -17,6 +17,7 @@ <argument name="product" type="entity"/> </arguments> + <waitForElementVisible selector="{{StorefrontComparisonSidebarSection.ProductTitleByName((product.name)}}" stepKey="waitForAddedCompareProduct"/> <click selector="{{StorefrontComparisonSidebarSection.ProductTitleByName((product.name))}}" stepKey="clickOnProductLink"/> <waitForPageLoad stepKey="waitForProductPageLoad"/> </actionGroup> From cd5558082beda9d251059f6ef31a94554d50777d Mon Sep 17 00:00:00 2001 From: eduard13 <e.chitoraga@atwix.com> Date: Thu, 26 Mar 2020 13:59:05 +0200 Subject: [PATCH 4/8] Moving the tests to the right module --- .../StorefrontClickOnProductFromSidebarCompareListActionGroup.xml | 0 .../StorefrontRemoveProductFromCompareSidebarTest.xml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename app/code/Magento/{Wishlist => Catalog}/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml (100%) rename app/code/Magento/{Wishlist/Test/Mftf/Test => Catalog/Test/Mftf/ActionGroup}/StorefrontRemoveProductFromCompareSidebarTest.xml (100%) diff --git a/app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml similarity index 100% rename from app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontRemoveProductFromCompareSidebarTest.xml similarity index 100% rename from app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml rename to app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontRemoveProductFromCompareSidebarTest.xml From 244a46bd81f1c4b02a437f7aa1f4c0f362453148 Mon Sep 17 00:00:00 2001 From: eduard13 <e.chitoraga@atwix.com> Date: Sun, 5 Apr 2020 13:10:52 +0300 Subject: [PATCH 5/8] Applying the fix to blank theme --- .../Magento/blank/Magento_Catalog/web/css/source/_module.less | 1 + 1 file changed, 1 insertion(+) diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less index f57420deb621d..295c7ef0424f5 100644 --- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less +++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less @@ -813,6 +813,7 @@ &.delete { &:extend(.abs-remove-button-for-blocks all); left: -6px; + right: auto; position: absolute; top: 0; } From 221ef5997a27782549f3d8de3bdda9864fdb101b Mon Sep 17 00:00:00 2001 From: eduard13 <e.chitoraga@atwix.com> Date: Thu, 9 Apr 2020 08:04:41 +0300 Subject: [PATCH 6/8] Small adjustments --- .../web/css/source/_module.less | 21 ++++++++++++++++--- .../web/css/source/_module.less | 3 ++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less index 295c7ef0424f5..4b48bbe99ced2 100644 --- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less +++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less @@ -457,11 +457,26 @@ .action { &.delete { &:extend(.abs-remove-button-for-blocks all); - line-height: unset; position: absolute; right: 0; top: -1px; - width: auto; + } + } + + .block-wishlist { + .action { + &.delete { + line-height: unset; + width: auto; + } + } + } + + .block-compare { + .action { + &.delete { + right: initial; + } } } @@ -813,8 +828,8 @@ &.delete { &:extend(.abs-remove-button-for-blocks all); left: -6px; - right: auto; position: absolute; + right: 0; top: 0; } diff --git a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less index f300b9ea52585..e205b20efd17c 100644 --- a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less @@ -1003,7 +1003,7 @@ .action { &.delete { left: 0; - right: auto; + right: initial; } } } @@ -1014,6 +1014,7 @@ .compare.wrapper { display: none; } + .catalog-product_compare-index { .columns { .column { From 044dc686a8f7b3cb92a34e8f3ec3c9a39032cde4 Mon Sep 17 00:00:00 2001 From: engcom-Echo <engcom-vendorworker-echo@adobe.com> Date: Tue, 9 Jun 2020 17:29:59 +0300 Subject: [PATCH 7/8] test file has been moved to the tests folder --- .../StorefrontRemoveProductFromCompareSidebarTest.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/code/Magento/Catalog/Test/Mftf/{ActionGroup => Test}/StorefrontRemoveProductFromCompareSidebarTest.xml (100%) diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontRemoveProductFromCompareSidebarTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml similarity index 100% rename from app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontRemoveProductFromCompareSidebarTest.xml rename to app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml From 435cc35031fb7107cb9e829c007800c04dba22a0 Mon Sep 17 00:00:00 2001 From: Andrii Kalinich <51681435+engcom-Echo@users.noreply.github.com> Date: Wed, 10 Jun 2020 15:30:31 +0300 Subject: [PATCH 8/8] Update StorefrontRemoveProductFromCompareSidebarTest.xml --- .../Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml index b0f5568ae8523..914ac3444db22 100644 --- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml +++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml @@ -15,6 +15,7 @@ <features value="Catalog"/> <severity value="MINOR"/> <group value="Catalog"/> + <testCaseId value="MC-35068"/> </annotations> <before> <createData entity="_defaultCategory" stepKey="defaultCategory"/>