Skip to content

Commit 5838691

Browse files
committed
Refactoring-AdminConfigurableProductOutOfStockTestDeleteChildrenTest
1 parent 02ba961 commit 5838691

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockTestDeleteChildrenTest.xml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,40 @@
8686
</after>
8787

8888
<!-- Check to make sure that the configurable product shows up as in stock -->
89-
<amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/>
90-
<waitForPageLoad stepKey="waitForStoreFrontLoad"/>
91-
<see stepKey="checkForOutOfStock" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK"/>
89+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToConfigProductPage"/>
90+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForStoreFrontLoad"/>
91+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkForOutOfStock">
92+
<argument name="productUrlKey" value="$createConfigProduct.custom_attributes[url_key]$"/>
93+
<argument name="productName" value="$createConfigProduct.name$"/>
94+
<argument name="stockStatus" value="IN STOCK"/>
95+
</actionGroup>
9296

9397
<!-- Delete the first simple product -->
9498
<actionGroup stepKey="deleteProduct1" ref="DeleteProductBySkuActionGroup">
9599
<argument name="sku" value="{{ApiSimpleOne.sku}}"/>
96100
</actionGroup>
97101

98102
<!-- Check to make sure that the configurable product shows up as in stock -->
99-
<amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage2"/>
100-
<waitForPageLoad stepKey="waitForStoreFrontLoad2"/>
101-
<see stepKey="checkForOutOfStock2" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="IN STOCK"/>
103+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToConfigProductPage2"/>
104+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForStoreFrontLoad2"/>
105+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkForOutOfStock2">
106+
<argument name="productUrlKey" value="$createConfigProduct.custom_attributes[url_key]$"/>
107+
<argument name="productName" value="$createConfigProduct.name$"/>
108+
<argument name="stockStatus" value="IN STOCK"/>
109+
</actionGroup>
102110

103111
<!-- Delete the second simple product -->
104112
<actionGroup stepKey="deleteProduct2" ref="DeleteProductBySkuActionGroup">
105113
<argument name="sku" value="{{ApiSimpleTwo.sku}}"/>
106114
</actionGroup>
107115

108116
<!-- Check to make sure that the configurable product shows up as out of stock -->
109-
<amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage3"/>
110-
<waitForPageLoad stepKey="waitForStoreFrontLoad3"/>
111-
<see stepKey="checkForOutOfStock3" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/>
117+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="goToConfigProductPage3"/>
118+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForStoreFrontLoad3"/>
119+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkForOutOfStock3">
120+
<argument name="productUrlKey" value="$createConfigProduct.custom_attributes[url_key]$"/>
121+
<argument name="productName" value="$createConfigProduct.name$"/>
122+
<argument name="stockStatus" value="OUT OF STOCK"/>
123+
</actionGroup>
112124
</test>
113125
</tests>

0 commit comments

Comments
 (0)