Skip to content

Replace repetitive actions with Action Groups in StorefrontConfigurableProductCanAddToCartTest #32117

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@
</after>

<!-- Verify adding configurable product to cart after an option is selected in storefront product view -->
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/>
<waitForPageLoad stepKey="wait"/>
<see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/>
<selectOption userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption1"/>
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="amOnConfigurableProductPage">
<argument name="productUrlKey" value="{{_defaultProduct.urlKey}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/>
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductName">
<argument name="productName" value="{{_defaultProduct.name}}"/>
</actionGroup>
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption1">
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
<argument name="optionLabel" value="{{colorProductAttribute1.name}}"/>
</actionGroup>
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="waitForAddToCartVisible"/>
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
<argument name="product" value="_defaultProduct"/>
Expand Down