Skip to content

Commit c1ef14e

Browse files
ENGCOM-8941: Replace repetitive actions with Action Groups in StorefrontConfigurableProductOptionsTest #32133
2 parents 9eec519 + fca8474 commit c1ef14e

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductOptionsTest.xml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,36 @@
4747
</after>
4848

4949
<!-- Verify configurable product options in storefront product view -->
50-
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/>
51-
<waitForPageLoad stepKey="wait"/>
52-
<see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/>
53-
<selectOption userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption1"/>
50+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="amOnConfigurableProductPage">
51+
<argument name="productUrlKey" value="{{_defaultProduct.urlKey}}"/>
52+
</actionGroup>
53+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/>
54+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductName">
55+
<argument name="productName" value="{{_defaultProduct.name}}"/>
56+
</actionGroup>
57+
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption1">
58+
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
59+
<argument name="optionLabel" value="{{colorProductAttribute1.name}}"/>
60+
</actionGroup>
5461
<dontSee userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="dontSeeProductPriceLabel1"/>
55-
<see userInput="1.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice1"/>
56-
<selectOption userInput="{{colorProductAttribute2.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption2"/>
62+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice1">
63+
<argument name="productPrice" value="1.00"/>
64+
</actionGroup>
65+
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption2">
66+
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
67+
<argument name="optionLabel" value="{{colorProductAttribute2.name}}"/>
68+
</actionGroup>
5769
<dontSee userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="dontSeeProductPriceLabel2"/>
58-
<see userInput="2.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice2"/>
59-
<selectOption userInput="{{colorProductAttribute3.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption3"/>
70+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice2">
71+
<argument name="productPrice" value="2.00"/>
72+
</actionGroup>
73+
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption3">
74+
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
75+
<argument name="optionLabel" value="{{colorProductAttribute3.name}}"/>
76+
</actionGroup>
6077
<dontSee userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="dontSeeProductPriceLabel3"/>
61-
<see userInput="3.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice3"/>
78+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice3">
79+
<argument name="productPrice" value="3.00"/>
80+
</actionGroup>
6281
</test>
6382
</tests>

0 commit comments

Comments
 (0)