|
| 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="ZeroSubtotalOrdersWithProcessingStatusTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="MAGETWO-71375: Zero Subtotal Orders have incorrect status"/> |
| 15 | + <title value="Checking status of Zero Subtotal Orders with 'Processing' New Order Status"/> |
| 16 | + <description value="Created order should be in Processing status"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-94178"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="SimpleSubCategory" stepKey="simplecategory"/> |
| 23 | + <createData entity="SimpleProduct" stepKey="simpleproduct"> |
| 24 | + <requiredEntity createDataKey="simplecategory"/> |
| 25 | + </createData> |
| 26 | + <createData entity="PaymentMethodsSettingConfig" stepKey="paymentMethodsSettingConfig"/> |
| 27 | + <createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/> |
| 28 | + <!--Go to Admin page--> |
| 29 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 30 | + </before> |
| 31 | + |
| 32 | + <after> |
| 33 | + <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteSalesRule"> |
| 34 | + <argument name="ruleName" value="{{ApiSalesRule.name}}"/> |
| 35 | + </actionGroup> |
| 36 | + <createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/> |
| 37 | + <createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/> |
| 38 | + <createData entity="DisablePaymentMethodsSettingConfig" stepKey="disablePaymentMethodsSettingConfig"/> |
| 39 | + <actionGroup ref="logout" stepKey="logout"/> |
| 40 | + <deleteData createDataKey="simpleproduct" stepKey="deleteProduct"/> |
| 41 | + <deleteData createDataKey="simplecategory" stepKey="deleteCategory"/> |
| 42 | + </after> |
| 43 | + |
| 44 | + <!--Open MARKETING > Cart Price Rules--> |
| 45 | + <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> |
| 46 | + <waitForPageLoad stepKey="waitForRulesPage"/> |
| 47 | + |
| 48 | + <!--Add New Rule--> |
| 49 | + <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> |
| 50 | + <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{ApiSalesRule.name}}" stepKey="fillRuleName"/> |
| 51 | + <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsite"/> |
| 52 | + <actionGroup ref="selectNotLoggedInCustomerGroup" stepKey="chooseNotLoggedInCustomerGroup"/> |
| 53 | + <selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Specific Coupon" stepKey="selectCouponType"/> |
| 54 | + <fillField selector="{{AdminCartPriceRulesFormSection.couponCode}}" userInput="{{_defaultCoupon.code}}" stepKey="fillCouponCode"/> |
| 55 | + <fillField selector="{{AdminCartPriceRulesFormSection.userPerCoupon}}" userInput="99" stepKey="fillUserPerCoupon"/> |
| 56 | + <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> |
| 57 | + <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/> |
| 58 | + <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="100" stepKey="fillDiscountAmount"/> |
| 59 | + <click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/> |
| 60 | + <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> |
| 61 | + |
| 62 | + <!--Proceed to store front and place an order with free shipping using created coupon--> |
| 63 | + <!--Add product to card--> |
| 64 | + <actionGroup ref="AddSimpleProductToCart" stepKey="AddProductToCard"> |
| 65 | + <argument name="product" value="$$simpleproduct$$"/> |
| 66 | + </actionGroup> |
| 67 | + |
| 68 | + <!--Proceed to shipment--> |
| 69 | + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickToOpenCard"/> |
| 70 | + <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickToProceedToCheckout"/> |
| 71 | + <waitForPageLoad stepKey="waitForTheFormIsOpened"/> |
| 72 | + |
| 73 | + <!--Fill shipping form--> |
| 74 | + <actionGroup ref="ShipmentFormFreeShippingActionGroup" stepKey="shipmentFormFreeShippingActionGroup"/> |
| 75 | + |
| 76 | + <click selector="{{DiscountSection.DiscountTab}}" stepKey="clickToAddDiscount"/> |
| 77 | + <fillField selector="{{DiscountSection.DiscountInput}}" userInput="{{_defaultCoupon.code}}" stepKey="TypeDiscountCode"/> |
| 78 | + <click selector="{{DiscountSection.ApplyCodeBtn}}" stepKey="clickToApplyDiscount"/> |
| 79 | + <waitForPageLoad stepKey="WaitForDiscountToBeAdded"/> |
| 80 | + <see userInput="Your coupon was successfully applied." stepKey="verifyText"/> |
| 81 | + |
| 82 | + <waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/> |
| 83 | + <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> |
| 84 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
| 85 | + |
| 86 | + <!--Proceed to Admin panel > SALES > Orders. Created order should be in Processing status--> |
| 87 | + <amOnPage url="/admin/sales/order/" stepKey="navigateToSalesOrderPage"/> |
| 88 | + <waitForPageLoad stepKey="waitForSalesOrderPageLoaded"/> |
| 89 | + |
| 90 | + <!-- Open Order --> |
| 91 | + <actionGroup ref="filterOrderGridById" stepKey="filterOrderGridById"> |
| 92 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 93 | + </actionGroup> |
| 94 | + <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> |
| 95 | + <waitForPageLoad stepKey="waitForCreatedOrderPageOpened"/> |
| 96 | + |
| 97 | + <!--Verify that Created order is in Processing status--> |
| 98 | + <see selector="{{AdminShipmentOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeShipmentOrderStatus"/> |
| 99 | + </test> |
| 100 | +</tests> |
0 commit comments