Skip to content

Refactoring StorefrontConfigurableProductBasicInfoTest #31827

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
Show file tree
Hide file tree
Changes from 3 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
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertStorefrontProductAttributeLabelVisibleActionGroup">
<arguments>
<argument name="productAttributeLabel" type="string"/>
</arguments>
<see selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" userInput="{{productAttributeLabel}}" stepKey="seeProductAttributeLabel"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertStorefrontProductAttributeOptionVisibleActionGroup">
<arguments>
<argument name="productAttributeOption" type="string"/>
</arguments>
<see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="{{productAttributeOption}}" stepKey="seeProductAttributeOption"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,35 @@
</after>

<!-- Verify configurable product details in storefront product view -->
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/>
<waitForPageLoad stepKey="wait"/>
<see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/>
<see userInput="{{_defaultProduct.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="seeProductSku"/>
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="amOnConfigurableProductPage">
<argument name="productUrl" 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="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSku">
<argument name="productSku" value="{{_defaultProduct.sku}}"/>
</actionGroup>
<see userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="seeProductPriceLabel"/>
<see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="seeProductStockStatus"/>
<see userInput="1.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice"/>
<see userInput="{{colorProductAttribute.default_label}}" selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" stepKey="seeProductAttributeTitle"/>
<see selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" userInput="{{colorProductAttribute.default_label}}" stepKey="seeColorAttributeName1"/>
<see userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="seeInDropDown1"/>
<see userInput="{{colorProductAttribute2.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="seeInDropDown2"/>
<see userInput="{{colorProductAttribute3.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="seeInDropDown3"/>
<actionGroup ref="AssertStorefrontProductStockStatusOnProductPageActionGroup" stepKey="seeProductStockStatus">
<argument name="productStockStatus" value="In Stock"/>
</actionGroup>
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice">
<argument name="productPrice" value="1.00"/>
</actionGroup>
<actionGroup ref="AssertStorefrontProductAttributeLabelVisibleActionGroup" stepKey="seeProductAttributeTitle">
<argument name="productAttributeLabel" value="{{colorProductAttribute.default_label}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="seeColorAttributeName1"/>
<actionGroup ref="AssertStorefrontProductAttributeOptionVisibleActionGroup" stepKey="seeInDropDown1">
<argument name="productAttributeOption" value="{{colorProductAttribute1.name}}"/>
</actionGroup>
<actionGroup ref="AssertStorefrontProductAttributeOptionVisibleActionGroup" stepKey="seeInDropDown2">
<argument name="productAttributeOption" value="{{colorProductAttribute2.name}}"/>
</actionGroup>
<actionGroup ref="AssertStorefrontProductAttributeOptionVisibleActionGroup" stepKey="seeInDropDown3">
<argument name="productAttributeOption" value="{{colorProductAttribute3.name}}"/>
</actionGroup>
</test>
</tests>