Skip to content

Commit 108d22f

Browse files
authored
ENGCOM-7292: [Catalog] Unable to open the product from sidebar's Compare Products block #27451
2 parents de54246 + 0826289 commit 108d22f

File tree

4 files changed

+95
-2
lines changed

4 files changed

+95
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="StorefrontClickOnProductFromSidebarCompareListActionGroup">
12+
<annotations>
13+
<description>Click on the product item from the sidebar comparing list.</description>
14+
</annotations>
15+
16+
<arguments>
17+
<argument name="product" type="entity"/>
18+
</arguments>
19+
20+
<waitForElementVisible selector="{{StorefrontComparisonSidebarSection.ProductTitleByName((product.name)}}" stepKey="waitForAddedCompareProduct"/>
21+
<click selector="{{StorefrontComparisonSidebarSection.ProductTitleByName((product.name))}}" stepKey="clickOnProductLink"/>
22+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontRemoveProductFromCompareSidebarTest">
11+
<annotations>
12+
<title value="Verify that the product isn't removed on clicking the product name"/>
13+
<stories value="Verify that the product isn't removed on clicking the product name"/>
14+
<description value="Verify that the product isn't removed on clicking the product name, but it's redirected to product page"/>
15+
<features value="Catalog"/>
16+
<severity value="MINOR"/>
17+
<group value="Catalog"/>
18+
<testCaseId value="MC-35068"/>
19+
</annotations>
20+
<before>
21+
<createData entity="_defaultCategory" stepKey="defaultCategory"/>
22+
<createData entity="SimpleProduct" stepKey="simpleProduct">
23+
<requiredEntity createDataKey="defaultCategory"/>
24+
</createData>
25+
</before>
26+
<after>
27+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
28+
<deleteData createDataKey="defaultCategory" stepKey="deleteCategory"/>
29+
</after>
30+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPage">
31+
<argument name="category" value="$$defaultCategory$$"/>
32+
</actionGroup>
33+
<actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="addProductToCompareList">
34+
<argument name="productVar" value="$$simpleProduct$$"/>
35+
</actionGroup>
36+
<actionGroup ref="StorefrontClickOnProductFromSidebarCompareListActionGroup" stepKey="clickOnComparingProductLink">
37+
<argument name="product" value="$$simpleProduct$$"/>
38+
</actionGroup>
39+
<actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductPageUrl">
40+
<argument name="productUrl" value="$$simpleProduct.custom_attributes[url_key]$$"/>
41+
</actionGroup>
42+
</test>
43+
</tests>

app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,26 @@
457457
.action {
458458
&.delete {
459459
&:extend(.abs-remove-button-for-blocks all);
460-
line-height: unset;
461460
position: absolute;
462461
right: 0;
463462
top: -1px;
464-
width: auto;
463+
}
464+
}
465+
466+
.block-wishlist {
467+
.action {
468+
&.delete {
469+
line-height: unset;
470+
width: auto;
471+
}
472+
}
473+
}
474+
475+
.block-compare {
476+
.action {
477+
&.delete {
478+
right: initial;
479+
}
465480
}
466481
}
467482

@@ -814,6 +829,7 @@
814829
&:extend(.abs-remove-button-for-blocks all);
815830
left: -6px;
816831
position: absolute;
832+
right: 0;
817833
top: 0;
818834
}
819835

app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,13 +998,23 @@
998998
}
999999
}
10001000
}
1001+
1002+
.block-compare {
1003+
.action {
1004+
&.delete {
1005+
left: 0;
1006+
right: initial;
1007+
}
1008+
}
1009+
}
10011010
}
10021011
}
10031012

10041013
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
10051014
.compare.wrapper {
10061015
display: none;
10071016
}
1017+
10081018
.catalog-product_compare-index {
10091019
.columns {
10101020
.column {

0 commit comments

Comments
 (0)