Skip to content

Commit

Permalink
ENGCOM-7292: [Catalog] Unable to open the product from sidebar's Comp…
Browse files Browse the repository at this point in the history
…are Products block #27451

 - Merge Pull Request #27451 from eduard13/magento2:compare-remove-product-issue
 - Merged commits:
   1. 11195fc
   2. 3e18da8
   3. 48b57fd
   4. cd55580
   5. 244a46b
   6. 95a2a09
   7. 221ef59
   8. a93a105
   9. 044dc68
   10. 435cc35
  • Loading branch information
magento-engcom-team committed Jun 12, 2020
2 parents f3a160c + 435cc35 commit 0826289
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontClickOnProductFromSidebarCompareListActionGroup">
<annotations>
<description>Click on the product item from the sidebar comparing list.</description>
</annotations>

<arguments>
<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>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?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="StorefrontRemoveProductFromCompareSidebarTest">
<annotations>
<title value="Verify that the product isn't removed on clicking the product name"/>
<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"/>
<testCaseId value="MC-35068"/>
</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="deleteCategory"/>
</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>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down Expand Up @@ -814,6 +829,7 @@
&:extend(.abs-remove-button-for-blocks all);
left: -6px;
position: absolute;
right: 0;
top: 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,13 +998,23 @@
}
}
}

.block-compare {
.action {
&.delete {
left: 0;
right: initial;
}
}
}
}
}

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
.compare.wrapper {
display: none;
}

.catalog-product_compare-index {
.columns {
.column {
Expand Down

0 comments on commit 0826289

Please sign in to comment.