Skip to content

Commit 39012d4

Browse files
authored
Merge pull request #5677 from magento-tsg/2.4-develop-pr39
[TSG] TESTs Fixes for 2.4 (pr39) (2.4-develop)
2 parents 134ef81 + 5b6121b commit 39012d4

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

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

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<testCaseId value="MC-71"/>
1818
<group value="CatalogRule"/>
1919
</annotations>
20+
2021
<before>
2122
<!-- Create a simple product and a category-->
2223
<createData entity="ApiCategory" stepKey="createCategory"/>
@@ -25,33 +26,32 @@
2526
</createData>
2627

2728
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
29+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/>
30+
<!-- Perform reindex and flush cache -->
31+
<actionGroup ref="AdminReindexAndFlushCache" stepKey="reindexAndFlushCache"/>
2832
</before>
33+
2934
<after>
3035
<!-- Delete the simple product and category -->
3136
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3237
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
33-
<!-- Delete the catalog rule -->
34-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToRulePage"/>
35-
<waitForPageLoad stepKey="waitForRulePage"/>
36-
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule">
37-
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
38-
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>
39-
</actionGroup>
40-
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
38+
<actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/>
39+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
40+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
4141
</after>
4242

4343
<!-- 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"/>
44+
<actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="createNewPriceRule"/>
45+
<actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForPriceRule">
46+
<argument name="groups" value="'NOT LOGGED IN'"/>
47+
</actionGroup>
48+
<actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsPriceRule"/>
49+
<actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyFPriceRule"/>
5250

5351
<!-- 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"/>
52+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToCategory1">
53+
<argument name="category" value="$createCategory$"/>
54+
</actionGroup>
5555
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$$createProduct.name$$" stepKey="seeProduct1"/>
5656
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber('1')}}" userInput="$110.70" stepKey="seeDiscountedPrice1"/>
5757

@@ -67,7 +67,9 @@
6767
</actionGroup>
6868

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

0 commit comments

Comments
 (0)