|
| 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="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminBlockCouponGenerateUntilRuleIsSavedWithAutoOptionTest"> |
| 12 | + <annotations> |
| 13 | + <features value="SalesRule"/> |
| 14 | + <stories value="Create cart price rule"/> |
| 15 | + <title value="Block the coupon generates until cart price rule is saved with auto generate option enabled"/> |
| 16 | + <description |
| 17 | + value="Block the coupon generates until cart price rule is saved with auto generate option enabled"/> |
| 18 | + <testCaseId value="MC-42288"/> |
| 19 | + <group value="salesRule"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <createData entity="SalesRuleNoCoupon" stepKey="createSalesRule"/> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + </before> |
| 26 | + |
| 27 | + <after> |
| 28 | + <deleteData createDataKey="createSalesRule" stepKey="deleteSalesRule"/> |
| 29 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> |
| 30 | + </after> |
| 31 | + |
| 32 | + <!-- Search Cart Price Rule and go to edit Cart Price Rule --> |
| 33 | + <actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/> |
| 34 | + <fillField selector="{{AdminCartPriceRulesSection.filterByNameInput}}" userInput="$$createSalesRule.name$$" |
| 35 | + stepKey="fillFieldFilterByName"/> |
| 36 | + <click selector="{{AdminCartPriceRulesSection.searchButton}}" stepKey="clickSearchButton"/> |
| 37 | + <see selector="{{AdminCartPriceRulesSection.nameColumns}}" userInput="$$createSalesRule.name$$" |
| 38 | + stepKey="seeRuleName"/> |
| 39 | + <click selector="{{AdminCartPriceRulesSection.rowContainingText($$createSalesRule.name$$)}}" |
| 40 | + stepKey="goToEditRule"/> |
| 41 | + |
| 42 | + <!-- Choose coupon type auto and generate coupon without saving the rule --> |
| 43 | + <selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Auto" stepKey="selectCouponType"/> |
| 44 | + <conditionalClick selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" |
| 45 | + dependentSelector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" visible="true" |
| 46 | + stepKey="clickManageCouponCodes"/> |
| 47 | + <fillField selector="{{AdminCartPriceRulesFormSection.couponQty}}" userInput="1" stepKey="fillFieldCouponQty"/> |
| 48 | + <click selector="{{AdminCartPriceRulesFormSection.generateCouponsButton}}" stepKey="clickGenerateCoupon"/> |
| 49 | + <see selector="{{AdminCartPriceRulesFormSection.modalMessage}}" userInput="Rule is not saved with auto generate option enabled. Please save the rule and try again." |
| 50 | + stepKey="seeModalMessage"/> |
| 51 | + </test> |
| 52 | +</tests> |
0 commit comments