Skip to content

Commit f596b92

Browse files
ENGCOM-8919: Replace repetitive actions with AdminCreateConfigurableProductWithDisabledChildrenProductsTest #32112
2 parents f0867b8 + 5b0864d commit f596b92

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,20 @@
110110
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
111111

112112
<!-- Assert configurable product is not present in category -->
113-
<amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage"/>
114-
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
115-
<see selector="{{StorefrontCategoryMainSection.emptyProductMessage}}" userInput="We can't find products matching the selection." stepKey="seeEmptyProductMessage"/>
113+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="amOnCategoryPage">
114+
<argument name="category" value="$createCategory$"/>
115+
</actionGroup>
116+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCategoryPageLoad"/>
117+
<actionGroup ref="AssertStorefrontNoProductsFoundActionGroup" stepKey="seeEmptyProductMessage"/>
118+
116119

117120
<!-- Assert configurable product is out of stock-->
118-
<amOnPage url="{{ApiConfigurableProduct.urlKey}}.html" stepKey="amOnProductPage"/>
119-
<waitForPageLoad stepKey="waitForPageLoad"/>
120-
<see stepKey="checkForOutOfStock" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/>
121+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="amOnProductPage"/>
122+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad"/>
123+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkForOutOfStock">
124+
<argument name="productUrlKey" value="{{ApiConfigurableProduct.urlKey}}"/>
125+
<argument name="productName" value="{{ApiConfigurableProduct.name}}"/>
126+
<argument name="stockStatus" value="Out of stock"/>
127+
</actionGroup>
121128
</test>
122129
</tests>

0 commit comments

Comments
 (0)