Skip to content

Commit 1bed86b

Browse files
Merge branch 'ACQE-9002' into ACQE-functional-deployment-v4-7
2 parents 6e78181 + c700f91 commit 1bed86b

File tree

4 files changed

+312
-0
lines changed

4 files changed

+312
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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+
<!--Select a swatch option on category page with hover - handles overlapping swatches-->
12+
<actionGroup name="StorefrontSelectSwatchOptionOnCategoryPageWithHoverActionGroup">
13+
<annotations>
14+
<description>Scrolls to and clicks a swatch option by label on the category page with hover behavior for overlapping swatch elements.</description>
15+
</annotations>
16+
<arguments>
17+
<argument name="optionLabel" type="string"/>
18+
</arguments>
19+
<scrollTo selector="{{StorefrontCategoryPageProductInfoSection.swatchOptionByLabel(optionLabel)}}" stepKey="scrollToSwatchOption"/>
20+
<moveMouseOver selector="{{StorefrontCategoryPageProductInfoSection.swatchOptionByLabel(optionLabel)}}" stepKey="hoverOverSwatchOption"/>
21+
<waitForElementClickable selector="{{StorefrontCategoryPageProductInfoSection.swatchOptionByLabel(optionLabel)}}" stepKey="waitForSwatchOptionClickable"/>
22+
<click selector="{{StorefrontCategoryPageProductInfoSection.swatchOptionByLabel(optionLabel)}}" stepKey="clickSwatchOption"/>
23+
<waitForPageLoad stepKey="waitAfterSwatchClick"/>
24+
</actionGroup>
25+
</actionGroups>
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
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+
<!--Select a swatch option on product page with scroll and hover - handles overlapping swatches-->
12+
<actionGroup name="StorefrontSelectSwatchOptionOnProductPageWithScrollAndHoverActionGroup" extends="StorefrontSelectSwatchOptionOnProductPageActionGroup">
13+
<annotations>
14+
<description>Extends StorefrontSelectSwatchOptionOnProductPageActionGroup to add scroll, hover behavior for overlapping swatch elements.</description>
15+
</annotations>
16+
<scrollTo selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(optionName)}}" stepKey="scrollToSwatchOption" before="waitForCreateConfigurationsButtonToBeClickable"/>
17+
<moveMouseOver selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(optionName)}}" stepKey="hoverOverSwatchOption" after="scrollToSwatchOption"/>
18+
<waitForElementClickable selector="{{StorefrontProductInfoMainSection.swatchOptionByLabel(optionName)}}" stepKey="waitForSwatchOptionClickable" after="hoverOverSwatchOption"/>
19+
<waitForPageLoad stepKey="waitAfterSwatchClick" after="clickSwatchOption"/>
20+
</actionGroup>
21+
</actionGroups>
22+

app/code/Magento/Swatches/Test/Mftf/Section/StorefrontCategoryPageProductInfoSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontCategoryPageProductInfoSection">
1212
<element name="visualSwatchOption" type="button" selector="#product-item-info_{{var1}} .swatch-option[data-option-label='{{var2}}']" parameterized="true"/>
13+
<element name="swatchOptionByLabel" type="button" selector=".products-grid .swatch-option[data-option-label='{{var1}}']" parameterized="true"/>
1314
<element name="productAddToWishlist" type="button" selector="#product-item-info_{{var1}} .action.towishlist" parameterized="true"/>
1415
</section>
1516
</sections>

0 commit comments

Comments
 (0)