Skip to content

Commit d1a342d

Browse files
committed
Merge branch 'MC-79' into RE-develop
2 parents cdb6483 + 59aa2cc commit d1a342d

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="seeSuccess"/>
31+
</before>
32+
<after>
33+
<deleteData createDataKey="createProduct" stepKey="deleteSimpleProduct"/>
34+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
35+
<amOnPage url="admin/catalog_rule/promo_catalog/" stepKey="goToPriceRulePage"/>
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="logout"/>
41+
</after>
42+
43+
<!-- Verify price is not discounted on category page -->
44+
<amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory"/>
45+
<waitForPageLoad stepKey="waitForCategory"/>
46+
<see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="seePrice1"/>
47+
48+
<!-- Verify price is not discounted on the product page -->
49+
<amOnPage url="$$createProduct.sku$$.html" stepKey="goToProduct"/>
50+
<waitForPageLoad stepKey="waitForProduct"/>
51+
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createProduct.price$$" stepKey="seePrice2"/>
52+
53+
<!-- Verify price is not discounted in the cart -->
54+
<click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
55+
<waitForPageLoad stepKey="waitForCart"/>
56+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckout"/>
57+
<waitForPageLoad stepKey="waitForCheckout"/>
58+
<see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$$createProduct.price$$" stepKey="seePrice3"/>
59+
</test>
60+
</tests>

0 commit comments

Comments
 (0)