Skip to content

Commit 11195fc

Browse files
committed
Fixing the opening of the product from the compare block
1 parent f3df323 commit 11195fc

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<click selector="{{StorefrontComparisonSidebarSection.ProductTitleByName((product.name))}}" stepKey="clickOnProductLink"/>
21+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
</annotations>
19+
<before>
20+
<createData entity="_defaultCategory" stepKey="defaultCategory"/>
21+
<createData entity="SimpleProduct" stepKey="simpleProduct">
22+
<requiredEntity createDataKey="defaultCategory"/>
23+
</createData>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
27+
<deleteData createDataKey="defaultCategory" stepKey="deleteCategory1"/>
28+
</after>
29+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPage">
30+
<argument name="category" value="$$defaultCategory$$"/>
31+
</actionGroup>
32+
<actionGroup ref="StorefrontAddCategoryProductToCompareActionGroup" stepKey="addProductToCompareList">
33+
<argument name="productVar" value="$$simpleProduct$$"/>
34+
</actionGroup>
35+
<actionGroup ref="StorefrontClickOnProductFromSidebarCompareListActionGroup" stepKey="clickOnComparingProductLink">
36+
<argument name="product" value="$$simpleProduct$$"/>
37+
</actionGroup>
38+
<actionGroup ref="StorefrontCheckProductUrlActionGroup" stepKey="checkProductPageUrl">
39+
<argument name="productUrl" value="$$simpleProduct.custom_attributes[url_key]$$"/>
40+
</actionGroup>
41+
</test>
42+
</tests>

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

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

0 commit comments

Comments
 (0)