Skip to content

Commit f86955a

Browse files
RaghavendraTirumalasettiManjusha.S
authored andcommitted
BUG#AC-2242:Error:Cart Price rule forces Free Shipping to "No" even if "-- Please Select --" was saved
1 parent b385443 commit f86955a

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="SimplefreeshippingoptionsTest">
11+
<annotations>
12+
<stories value="Create Sales Rule"/>
13+
<title value="Test the simple free shipping options as default it should select Please select option"/>
14+
<description value="Test the simple free shipping options as default it should select Please select option"/>
15+
<testCaseId value="AC-2242"/>
16+
<useCaseId value="AC-2242"/>
17+
<severity value="MAJOR"/>
18+
<group value="SalesRule"/>
19+
</annotations>
20+
21+
<before>
22+
<!-- Login to admin panel -->
23+
<openNewTab stepKey="openNewTab"/>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
26+
<!--navigate to cart price rule -->
27+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToMarketingCartPriceRulesPage">
28+
<argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/>
29+
<argument name="submenuUiId" value="{{AdminMenuMarketingPromotionsCartPriceRules.dataUiId}}"/>
30+
</actionGroup>
31+
</before>
32+
33+
<after>
34+
<!-- Delete sales rule -->
35+
<actionGroup ref="DeleteCartPriceRuleByName" stepKey="cleanUpRule">
36+
<argument name="ruleName" value="ship"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromBackend"/>
39+
</after>
40+
41+
<!--Create cart price rule as per data and verify AssertCartPriceRuleSuccessSaveMessage-->
42+
<actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/>
43+
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
44+
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.name}}" stepKey="fillRuleName"/>
45+
<fillField selector="{{AdminCartPriceRulesFormSection.description}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.description}}" stepKey="fillDescription"/>
46+
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.websites}}" stepKey="selectWebsites"/>
47+
<selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{CartPriceRuleConditionAndFreeShippingApplied.customerGroups}}]" stepKey="selectCustomerGroup"/>
48+
<selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.coupon_type}}" stepKey="selectCouponType"/>
49+
<scrollTo selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="scrollToActionsHeader"/>
50+
<actionGroup ref="AdminCreateCartPriceRuleActionsSectionDiscountFieldsActionGroup" stepKey="createActiveCartPriceRuleActionsSection">
51+
<argument name="rule" value="CartPriceRuleConditionAndFreeShippingApplied"/>
52+
</actionGroup>
53+
<actionGroup ref="AdminCreateCartPriceRuleLabelsSectionActionGroup" stepKey="createActiveCartPriceRuleLabelsSection">
54+
<argument name="rule" value="CartPriceRuleConditionAndFreeShippingApplied"/>
55+
</actionGroup>
56+
<actionGroup ref="AssertCartPriceRuleSuccessSaveMessageActionGroup" stepKey="seeAssertCartPriceRuleSuccessSaveMessage"/>
57+
58+
<!--Search created cart price rule in grid-->
59+
<actionGroup ref="AdminFilterCartPriceRuleActionGroup" stepKey="searchCreatedCartPriceRuleInGrid">
60+
<argument name="ruleName" value="CartPriceRuleConditionAndFreeShippingApplied.name"/>
61+
</actionGroup>
62+
63+
<!--Go to cart price rule form page and verify AssertCartPriceRuleForm-->
64+
<conditionalClick selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" dependentSelector="{{AdminCartPriceRulesFormSection.actionsHeader}}" visible="true" stepKey="clickExpandActions"/>
65+
<see selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.simple_action}}" stepKey="seeActionApplyType"/>
66+
<seeInField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="{{CartPriceRuleConditionAndFreeShippingApplied.discount_amount}}" stepKey="seeDiscountAmount"/>
67+
<selectOption selector="{{AdminCartPriceRulesFormSection.freeShipping}}" userInput="Please Select" stepKey="selectFreeShippingType"/>
68+
</test>
69+
</tests>
70+

0 commit comments

Comments
 (0)