Skip to content

Commit 072b595

Browse files
authored
ENGCOM-9326: Replace repetitive actions with Action Groups in AdminCreateCatalogPriceRuleForCustomerGroupTest #34114
2 parents 613e222 + 01b4c7e commit 072b595

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
<click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/>
4747

4848
<!--<click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/>-->
49-
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="assertSuccess"/>
49+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccess">
50+
<argument name="message" value="You saved the rule."/>
51+
</actionGroup>
5052

5153
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
5254
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
@@ -55,8 +57,13 @@
5557
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToCategory1">
5658
<argument name="category" value="$createCategory$"/>
5759
</actionGroup>
58-
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$$createProduct.name$$" stepKey="seeProduct1"/>
59-
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$110.70" stepKey="seeDiscountedPrice1"/>
60+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeProduct1">
61+
<argument name="productName" value="$$createProduct.name$$"/>
62+
</actionGroup>
63+
<actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeDiscountedPrice1">
64+
<argument name="productName" value="$$createProduct.name$$"/>
65+
<argument name="productPrice" value="$110.70"/>
66+
</actionGroup>
6067

6168
<!-- Create a user account -->
6269
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
@@ -73,7 +80,12 @@
7380
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToCategory2">
7481
<argument name="category" value="$createCategory$"/>
7582
</actionGroup>
76-
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$$createProduct.name$$" stepKey="seeProduct2"/>
77-
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$123.00" stepKey="seeDiscountedPrice2"/>
83+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeProduct2">
84+
<argument name="productName" value="$$createProduct.name$$"/>
85+
</actionGroup>
86+
<actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeDiscountedPrice2">
87+
<argument name="productName" value="$$createProduct.name$$"/>
88+
<argument name="productPrice" value="$123.00"/>
89+
</actionGroup>
7890
</test>
7991
</tests>

0 commit comments

Comments
 (0)