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+ <features value =" SalesRule" />
13+ <stories value =" Creating Sales Rule" />
14+ <title value =" Test the simple free shipping options as default it should select Please select option" />
15+ <description value =" Test the simple free shipping options as default it should select Please select option " />
16+ <severity value =" MAJOR" />
17+ <group value =" SalesRule" />
18+ </annotations >
19+
20+ <before >
21+ <!-- Login to admin panel -->
22+ <actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdmin" />
23+ <!-- navigate to cart price rule -->
24+ </before >
25+
26+ <after >
27+ <!-- Delete sales rule -->
28+ <actionGroup ref =" DeleteCartPriceRuleByName" stepKey =" cleanUpRule" >
29+ <argument name =" ruleName" value =" Cart Price Rule" />
30+ </actionGroup >
31+ <actionGroup ref =" AdminLogoutActionGroup" stepKey =" logoutFromBackend" />
32+ </after >
33+
34+ <!-- Create cart price rule as per data and verify Free shipping options-->
35+ <actionGroup ref =" AdminOpenCartPriceRulesPageActionGroup" stepKey =" amOnCartPriceList" />
36+ <click selector =" {{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey =" clickAddNewRule" />
37+ <fillField selector =" {{AdminCartPriceRulesFormSection.ruleName}}" userInput =" {{CartPriceRuleConditionAndFreeShippingApplied.name}}" stepKey =" fillRuleName" />
38+ <fillField selector =" {{AdminCartPriceRulesFormSection.description}}" userInput =" {{CartPriceRuleConditionAndFreeShippingApplied.description}}" stepKey =" fillDescription" />
39+ <selectOption selector =" {{AdminCartPriceRulesFormSection.websites}}" userInput =" {{CartPriceRuleConditionAndFreeShippingApplied.websites}}" stepKey =" selectWebsites" />
40+ <actionGroup ref =" SelectRetailerCustomerGroupActionGroup" stepKey =" selectRetailerCustomerGroup" />
41+ <selectOption selector =" {{AdminCartPriceRulesFormSection.coupon}}" userInput =" {{CartPriceRuleConditionAndFreeShippingApplied.coupon_type}}" stepKey =" selectCouponType" />
42+ <scrollTo selector =" {{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey =" scrollToActionsHeader" />
43+ <actionGroup ref =" AdminCreateCartPriceRuleActionsSectionDiscountFieldsActionGroup" stepKey =" createActiveCartPriceRuleActionsSection" >
44+ <argument name =" rule" value =" CartPriceRuleConditionAndFreeShippingApplied" />
45+ </actionGroup >
46+ <actionGroup ref =" AdminCreateCartPriceRuleLabelsSectionActionGroup" stepKey =" createActiveCartPriceRuleLabelsSection" >
47+ <argument name =" rule" value =" CartPriceRuleConditionAndFreeShippingApplied" />
48+ </actionGroup >
49+ <actionGroup ref =" AssertCartPriceRuleSuccessSaveMessageActionGroup" stepKey =" seeAssertCartPriceRuleSuccessSaveMessage" />
50+
51+ <!-- Search created cart price rule in grid-->
52+ <actionGroup ref =" AdminFilterCartPriceRuleActionGroup" stepKey =" searchCreatedCartPriceRuleInGrid" >
53+ <argument name =" ruleName" value =" CartPriceRuleConditionAndFreeShippingApplied.name" />
54+ </actionGroup >
55+
56+ <!-- Go to cart price rule form page and verify Free shipping options-->
57+ <conditionalClick selector =" {{AdminCartPriceRulesFormSection.actionsHeader}}" dependentSelector =" {{AdminCartPriceRulesFormSection.actionsHeader}}" visible =" true" stepKey =" clickExpandActions" />
58+ <see selector =" {{AdminCartPriceRulesFormSection.apply}}" userInput =" {{CartPriceRuleConditionAndFreeShippingApplied.simple_action}}" stepKey =" seeActionApplyType" />
59+ <seeInField selector =" {{AdminCartPriceRulesFormSection.discountAmount}}" userInput =" {{CartPriceRuleConditionAndFreeShippingApplied.discount_amount}}" stepKey =" seeDiscountAmount" />
60+ <seeOptionIsSelected selector =" {{AdminCartPriceRulesFormSection.freeShipping}}" userInput =" Please Select" stepKey =" selectFreeShippingType" />
61+ </test >
62+ </tests >
0 commit comments