Skip to content

Commit 09f63c0

Browse files
committed
- refactoring the test
1 parent b4db970 commit 09f63c0

File tree

3 files changed

+44
-14
lines changed

3 files changed

+44
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontProductAttributeLabelVisibleActionGroup">
12+
<arguments>
13+
<argument name="productAttributeLabel" type="string"/>
14+
</arguments>
15+
<see selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" userInput="{{productAttributeLabel}}" stepKey="seeProductAttributeLabel"/>
16+
</actionGroup>
17+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontProductAtttributeOptionVisibleActionGroup">
12+
<arguments>
13+
<argument name="productAttributeOption" type="string"/>
14+
</arguments>
15+
<see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="{{productAttributeOption}}" stepKey="seeProductAttributeOption"/>
16+
</actionGroup>
17+
</actionGroups>

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,35 @@
3838
</after>
3939

4040
<!-- Verify configurable product details in storefront product view -->
41-
<!--<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/>-->
42-
<!--<waitForPageLoad stepKey="wait"/>-->
4341
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage">
4442
<argument name="productUrl" value="{{_defaultProduct.urlKey}}"/>
4543
</actionGroup>
4644
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/>
47-
48-
<!--<see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/>-->
4945
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductName">
5046
<argument name="productName" value="{{_defaultProduct.name}}"/>
5147
</actionGroup>
52-
53-
<!--<see userInput="{{_defaultProduct.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="seeProductSku"/>-->
5448
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSku">
5549
<argument name="productSku" value="{{_defaultProduct.sku}}"/>
5650
</actionGroup>
57-
5851
<see userInput="As low as" selector="{{StorefrontProductInfoMainSection.productPriceLabel}}" stepKey="seeProductPriceLabel"/>
59-
<!--<see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="seeProductStockStatus"/>-->
6052
<actionGroup ref="AssertStorefrontProductStockStatusOnProductPageActionGroup" stepKey="seeProductStatusInStoreFront">
6153
<argument name="productStockStatus" value="In Stock"/>
6254
</actionGroup>
63-
<!--<see userInput="1.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seeProductPrice"/>-->
6455
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPrice">
6556
<argument name="productPrice" value="1.00"/>
6657
</actionGroup>
67-
<!--<see userInput="{{colorProductAttribute.default_label}}" selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" stepKey="seeProductAttributeTitle"/>-->
6858
<actionGroup ref="AssertStorefrontProductAttributeLabelVisibleActionGroup" stepKey="seeProductAttributeTitle">
6959
<argument name="productAttributeLabel" value="{{colorProductAttribute.default_label}}"/>
7060
</actionGroup>
71-
<see selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" userInput="{{colorProductAttribute.default_label}}" stepKey="seeColorAttributeName1"/>
72-
<see userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="seeInDropDown1"/>
73-
<see userInput="{{colorProductAttribute2.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="seeInDropDown2"/>
74-
<see userInput="{{colorProductAttribute3.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="seeInDropDown3"/>
61+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="seeColorAttributeName1"/>
62+
<actionGroup ref="AssertStorefrontProductAtttributeOptionVisibleActionGroup" stepKey="seeInDropDown1">
63+
<argument name="productAttributeOption" value="{{colorProductAttribute1.name}}"/>
64+
</actionGroup>
65+
<actionGroup ref="AssertStorefrontProductAtttributeOptionVisibleActionGroup" stepKey="seeInDropDown2">
66+
<argument name="productAttributeOption" value="{{colorProductAttribute2.name}}"/>
67+
</actionGroup>
68+
<actionGroup ref="AssertStorefrontProductAtttributeOptionVisibleActionGroup" stepKey="seeInDropDown3">
69+
<argument name="productAttributeOption" value="{{colorProductAttribute3.name}}"/>
70+
</actionGroup>
7571
</test>
7672
</tests>

0 commit comments

Comments
 (0)