|
16 | 16 | <description value="Customer should not see the catalog price rule promotion if status is inactive"/>
|
17 | 17 | <severity value="CRITICAL"/>
|
18 | 18 | <testCaseId value="MC-79"/>
|
19 |
| - <group value="CatalogRule"/> |
20 |
| - <skip> |
21 |
| - <issueId value="MC-30384"/> |
22 |
| - </skip> |
| 19 | + <group value="catalogRule"/> |
23 | 20 | </annotations>
|
| 21 | + |
24 | 22 | <before>
|
25 |
| - <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
26 | 23 | <createData entity="ApiCategory" stepKey="createCategory"/>
|
27 | 24 | <createData entity="ApiSimpleProduct" stepKey="createProduct">
|
28 | 25 | <requiredEntity createDataKey="createCategory"/>
|
29 | 26 | </createData>
|
30 |
| - <actionGroup stepKey="createNewPriceRule" ref="NewCatalogPriceRuleByUIActionGroup"/> |
31 |
| - <actionGroup stepKey="selectLoggedInCustomers" ref="SelectNotLoggedInCustomerGroupActionGroup"/> |
32 |
| - <scrollToTopOfPage stepKey="scrollToTop"/> |
33 |
| - <click stepKey="setInactive" selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"/> |
34 |
| - <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/> |
35 |
| - <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="seeSuccess"/> |
| 27 | + <actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/> |
| 28 | + <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> |
36 | 29 |
|
37 |
| - <!-- Perform reindex and flush cache --> |
38 |
| - <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
39 |
| - <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 30 | + <actionGroup ref="AdminOpenNewCatalogPriceRuleFormPageActionGroup" stepKey="startCreatingFirstPriceRule"/> |
| 31 | + <actionGroup ref="AdminCatalogPriceRuleFillMainInfoActionGroup" stepKey="fillMainInfoForFirstPriceRule"> |
| 32 | + <argument name="active" value="0"/> |
| 33 | + <argument name="groups" value="'NOT LOGGED IN'"/> |
| 34 | + </actionGroup> |
| 35 | + <actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForThirdPriceRule"/> |
| 36 | + <actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyFirstPriceRule"/> |
| 37 | + <!-- Perform reindex --> |
| 38 | + <magentoCLI command="indexer:reindex" arguments="catalogrule_rule" stepKey="reindex"/> |
40 | 39 | </before>
|
| 40 | + |
41 | 41 | <after>
|
42 | 42 | <deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/>
|
43 | 43 | <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
|
44 |
| - <amOnPage url="admin/catalog_rule/promo_catalog/" stepKey="goToPriceRulePage"/> |
45 |
| - <actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule"> |
46 |
| - <argument name="name" value="{{_defaultCatalogRule.name}}"/> |
47 |
| - <argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/> |
48 |
| - </actionGroup> |
49 |
| - <amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/> |
| 44 | + <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/> |
| 45 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
50 | 46 | </after>
|
51 | 47 |
|
52 | 48 | <!-- Verify price is not discounted on category page -->
|
53 |
| - <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory"/> |
54 |
| - <waitForPageLoad stepKey="waitForCategory"/> |
55 |
| - <see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="seePrice1"/> |
| 49 | + <amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="openCategoryPageOnFrontend"/> |
| 50 | + <waitForPageLoad stepKey="waitForCategoryPageLoaded"/> |
| 51 | + <see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="seeProductPriceOnCategoryPage"/> |
56 | 52 |
|
57 | 53 | <!-- Verify price is not discounted on the product page -->
|
58 |
| - <amOnPage url="$$createProduct.sku$$.html" stepKey="goToProduct"/> |
59 |
| - <waitForPageLoad stepKey="waitForProduct"/> |
60 |
| - <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createProduct.price$$" stepKey="seePrice2"/> |
| 54 | + <amOnPage url="{{StorefrontProductPage.url($createProduct.custom_attributes[url_key]$)}}" stepKey="openProductPageOnFrontend"/> |
| 55 | + <waitForPageLoad stepKey="waitForProductPageLoaded"/> |
| 56 | + <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$createProduct.price$" stepKey="seePriceOnProductPage"/> |
61 | 57 |
|
62 | 58 | <!-- Verify price is not discounted in the cart -->
|
63 |
| - <click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/> |
64 |
| - <waitForPageLoad stepKey="waitForCart"/> |
65 |
| - <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/> |
66 |
| - <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/> |
67 |
| - <waitForPageLoad stepKey="waitForCheckout"/> |
68 |
| - <see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$$createProduct.price$$" stepKey="seePrice3"/> |
| 59 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 60 | + <argument name="productName" value="$createProduct.name$"/> |
| 61 | + </actionGroup> |
| 62 | + <actionGroup ref="StorefrontOpenCartPageActionGroup" stepKey="openCartPage" /> |
| 63 | + <waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalAppears"/> |
| 64 | + <see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$createProduct.price$" stepKey="seeProductPriceOnCartPage"/> |
69 | 65 | </test>
|
70 | 66 | </tests>
|
0 commit comments