Skip to content

Commit 51134c0

Browse files
committed
MC-34251: [MFTF] CatalogPriceRuleConfigurableProductAdditionalStockTest failed because of bad design
1 parent 0423eae commit 51134c0

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

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

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
</createData>
2626

2727
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
28+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/>
2829
</before>
2930
<after>
3031
<!-- Delete the simple product and category -->
@@ -37,21 +38,24 @@
3738
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
3839
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>
3940
</actionGroup>
40-
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
41+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/>
42+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
4143
</after>
4244

4345
<!-- Create a catalog rule for the NOT LOGGED IN customer group -->
44-
<actionGroup ref="NewCatalogPriceRuleByUIActionGroup" stepKey="createNewPriceRule"/>
45-
<actionGroup ref="SelectNotLoggedInCustomerGroupActionGroup" stepKey="selectNotLoggedInCustomerGroup"/>
46-
<click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/>
47-
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="assertSuccess"/>
48-
49-
<!-- Perform reindex and flush cache -->
50-
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
51-
<magentoCLI command="cache:flush" stepKey="flushCache"/>
46+
<actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="createNewPriceRule"/>
47+
<actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForPriceRule">
48+
<argument name="groups" value="'NOT LOGGED IN'"/>
49+
</actionGroup>
50+
<actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsPriceRule"/>
51+
<actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyFPriceRule"/>
52+
<!-- Perform reindex -->
53+
<magentoCLI command="indexer:reindex" arguments="catalogrule_rule" stepKey="reindexPriceRuleIndex"/>
5254

5355
<!-- As a NOT LOGGED IN user, go to the storefront category page and should see the discount -->
54-
<amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory1"/>
56+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToCategory1">
57+
<argument name="category" value="$createCategory$"/>
58+
</actionGroup>
5559
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$$createProduct.name$$" stepKey="seeProduct1"/>
5660
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$110.70" stepKey="seeDiscountedPrice1"/>
5761

@@ -67,7 +71,9 @@
6771
</actionGroup>
6872

6973
<!-- As a logged in user, go to the storefront category page and should NOT see discount -->
70-
<amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory2"/>
74+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToCategory2">
75+
<argument name="category" value="$createCategory$"/>
76+
</actionGroup>
7177
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$$createProduct.name$$" stepKey="seeProduct2"/>
7278
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$123.00" stepKey="seeDiscountedPrice2"/>
7379
</test>

0 commit comments

Comments
 (0)