Skip to content

Commit f0867b8

Browse files
ENGCOM-8922: Replace repetitive actions with Action Groups in StorefrontConfigurableProductCanAddToCartTest #32117
2 parents c1ef14e + 04f6313 commit f0867b8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,17 @@
4747
</after>
4848

4949
<!-- Verify adding configurable product to cart after an option is selected 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
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="waitForAddToCartVisible"/>
5562
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
5663
<argument name="product" value="_defaultProduct"/>

0 commit comments

Comments
 (0)