-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Catalog] Unable to open the product from sidebar's Compare Products block #27451
Merged
magento-engcom-team
merged 10 commits into
magento:2.4-develop
from
eduard13:compare-remove-product-issue
Jun 13, 2020
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
11195fc
Fixing the opening of the product from the compare block
eduard13 3e18da8
Fixing the opening of the product from the compare block
eduard13 48b57fd
Fixing the opening of the product from the compare block
eduard13 cd55580
Moving the tests to the right module
eduard13 244a46b
Applying the fix to blank theme
eduard13 95a2a09
Merge branch '2.4-develop' into compare-remove-product-issue
eduard13 221ef59
Small adjustments
eduard13 a93a105
Merge branch '2.4-develop' of http://github.com/magento/magento2 into…
engcom-Echo 044dc68
test file has been moved to the tests folder
engcom-Echo 435cc35
Update StorefrontRemoveProductFromCompareSidebarTest.xml
engcom-Echo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...hlist/Test/Mftf/ActionGroup/StorefrontClickOnProductFromSidebarCompareListActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
42 changes: 42 additions & 0 deletions
42
app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductFromCompareSidebarTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend moving this action group to the
Catalog
module. Clicking on a product from the sidebar is not directly related to the wishlist. By moving it to theCatalog
we will bring more chances that the newly introduced action group will be reused in the futuresThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rogyar thank you for pointing this up. Looks like I got mixed up with the modules 🤦♂. I've moved the test and the new ActionGroup to the Catalog module.