Skip to content

Commit 8c3d834

Browse files
committed
MC-79: Customer should not see the catalog price rule promotion if status is inactive
1 parent 77e82fc commit 8c3d834

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="StorefrontInactiveCatalogRuleTest">
12+
<annotations>
13+
<features value="CatalogRule"/>
14+
<stories value="Customer view catalog price rule"/>
15+
<title value="Customer should not see the catalog price rule promotion if status is inactive"/>
16+
<description value="Customer should not see the catalog price rule promotion if status is inactive"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-79"/>
19+
<group value="CatalogRule"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
23+
<createData entity="ApiCategory" stepKey="createCategory"/>
24+
<createData entity="ApiSimpleProduct" stepKey="createProduct">
25+
<requiredEntity createDataKey="createCategory"/>
26+
</createData>
27+
<actionGroup ref="newCatalogPriceRuleByUI" stepKey="createNewPriceRule"/>
28+
<selectOption selector="{{AdminNewCatalogPriceRule.status}}" userInput="Inactive" stepKey="setInactive"/>
29+
<click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/>
30+
</before>
31+
<after>
32+
<deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/>
33+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
34+
<amOnPage url="admin/catalog_rule/promo_catalog/" stepKey="goToPriceRulePage"/>
35+
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule">
36+
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
37+
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>
38+
</actionGroup>
39+
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/>
40+
</after>
41+
42+
<!-- Verify price is not discounted on category page -->
43+
<amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory"/>
44+
<waitForPageLoad stepKey="waitForCategory"/>
45+
<see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="seePrice1"/>
46+
47+
<!-- Verify price is not discounted on the product page -->
48+
<amOnPage url="$$createProduct.sku$$.html" stepKey="goToProduct"/>
49+
<waitForPageLoad stepKey="waitForProduct"/>
50+
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createProduct.price$$" stepKey="seePrice2"/>
51+
52+
<!-- Verify price is not discounted in the cart -->
53+
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
54+
<waitForPageLoad stepKey="waitForCart"/>
55+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/>
56+
<waitForPageLoad stepKey="waitForCheckout"/>
57+
<see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$$createProduct.price$$" stepKey="seePrice3"/>
58+
</test>
59+
</tests>

0 commit comments

Comments
 (0)