Skip to content

Commit

Permalink
Fixing the opening of the product from the compare block
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard13 committed Mar 26, 2020
1 parent f3df323 commit 11195fc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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>

<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,42 @@
<?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"/>
</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>
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,15 @@
}
}
}

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

Expand Down

0 comments on commit 11195fc

Please sign in to comment.