Skip to content

[MFTF] ZeroSubtotalOrdersWithProcessingStatusTest refactoring #33793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminCheckZeroSubtotalOrderIsInProcessingStatusTest">
<annotations>
<features value="Checkout"/>
<stories value="MAGETWO-71375: Zero Subtotal Orders have incorrect status"/>
<title value="Zero Subtotal Orders should have the 'Processing' status on creating"/>
<description value="Created order should be in Processing status"/>
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-94178"/>
<group value="checkout"/>
</annotations>
<before>
<createData entity="SimpleSubCategory" stepKey="simplecategory"/>
<createData entity="SimpleProduct" stepKey="simpleproduct">
<requiredEntity createDataKey="simplecategory"/>
</createData>
<createData entity="PaymentMethodsSettingConfig" stepKey="paymentMethodsSettingConfig"/>
<createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/>

<createData entity="ApiSalesRule" stepKey="createCartPriceRule">
<field key="discount_amount">100</field>
</createData>
<createData entity="ApiSalesRuleCoupon" stepKey="createCartPriceRuleCoupon">
<requiredEntity createDataKey="createCartPriceRule"/>
</createData>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

</before>

<after>
<deleteData createDataKey="createCartPriceRule" stepKey="deleteSalesRule"/>
<createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/>
<createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/>
<createData entity="DisablePaymentMethodsSettingConfig" stepKey="disablePaymentMethodsSettingConfig"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
<deleteData createDataKey="simpleproduct" stepKey="deleteProduct"/>
<deleteData createDataKey="simplecategory" stepKey="deleteCategory"/>
</after>

<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="AddProductToCard">
<argument name="product" value="$$simpleproduct$$"/>
</actionGroup>

<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="clickToProceedToCheckout"/>

<actionGroup ref="ShipmentFormFreeShippingActionGroup" stepKey="shipmentFormFreeShippingActionGroup"/>

<actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyDiscountCoupon">
<argument name="discountCode" value="$createCartPriceRuleCoupon.code$"/>
</actionGroup>

<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/>
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>

<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>

<actionGroup ref="AdminCheckOrderStatusInGridActionGroup" stepKey="seeOrderStatusInGrid">
<argument name="orderId" value="$grabOrderNumber"/>
<argument name="status" value="Processing"/>
</actionGroup>

</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-94178"/>
<group value="checkout"/>
<skip>
<issueId value="DEPRECATED">Use AdminCheckZeroSubtotalOrderIsInProcessingStatusTest instead</issueId>
</skip>
</annotations>
<before>
<createData entity="SimpleSubCategory" stepKey="simplecategory"/>
Expand Down