Skip to content

Commit 6fb3cff

Browse files
committed
Refactoring the test
1 parent 0d3d7bb commit 6fb3cff

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
@@ -38,17 +38,36 @@
3838
</after>
3939

4040
<!-- Verify configurable product options in storefront product view -->
41-
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/>
42-
<waitForPageLoad stepKey="wait"/>
43-
<see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/>
44-
<selectOption userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption1"/>
41+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="amOnConfigurableProductPage">
42+
<argument name="productUrlKey" value="{{_defaultProduct.urlKey}}"/>
43+
</actionGroup>
44+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/>
45+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductName">
46+
<argument name="productName" value="{{_defaultProduct.name}}"/>
47+
</actionGroup>
48+
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption1">
49+
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
50+
<argument name="optionLabel" value="{{colorProductAttribute1.name}}"/>
51+
</actionGroup>
4552
<dontSee userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="dontSeeProductPriceLabel1"/>
46-
<see userInput="1.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice1"/>
47-
<selectOption userInput="{{colorProductAttribute2.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption2"/>
53+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice1">
54+
<argument name="productPrice" value="1.00"/>
55+
</actionGroup>
56+
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption2">
57+
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
58+
<argument name="optionLabel" value="{{colorProductAttribute2.name}}"/>
59+
</actionGroup>
4860
<dontSee userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="dontSeeProductPriceLabel2"/>
49-
<see userInput="2.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice2"/>
50-
<selectOption userInput="{{colorProductAttribute3.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption3"/>
61+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice2">
62+
<argument name="productPrice" value="2.00"/>
63+
</actionGroup>
64+
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption3">
65+
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
66+
<argument name="optionLabel" value="{{colorProductAttribute3.name}}"/>
67+
</actionGroup>
5168
<dontSee userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="dontSeeProductPriceLabel3"/>
52-
<see userInput="3.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice3"/>
69+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice3">
70+
<argument name="productPrice" value="3.00"/>
71+
</actionGroup>
5372
</test>
5473
</tests>

0 commit comments

Comments
 (0)