Skip to content

Commit eef1eb9

Browse files
shanthiManjusha.S
authored andcommitted
MC-36889:Admin orders multi-select action applied to unchecked newly created orders
1 parent b998afd commit eef1eb9

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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="AdminOrdersMultiSelectActionAppliedToUncheckedNewlyCreatedOrdersTest">
12+
<annotations>
13+
<features value="Sales"/>
14+
<stories value="Multi Select action"/>
15+
<title value="Admin orders multi-select action applied to unchecked newly created orders test"/>
16+
<description value="Admin orders multi-select action applied to unchecked newly created orders"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-36889"/>
19+
<group value="multiselect"/>
20+
</annotations>
21+
<before>
22+
<!--Set default flat rate shipping method settings-->
23+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
24+
25+
<!--Create Product-->
26+
<createData entity="SimpleProduct2" stepKey="createProduct">
27+
<field key="price">5</field>
28+
</createData>
29+
<!--Create customer-->
30+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
31+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
32+
</before>
33+
34+
<after>
35+
<!--Delete product-->
36+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
37+
<!--Delete customer-->
38+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
39+
<!--Clear filters on orders grid-->
40+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrdersFilters"/>
41+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
42+
</after>
43+
44+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
45+
<click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
46+
<click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/>
47+
<waitForPageLoad stepKey="waitForProductList"/>
48+
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addVirtualProductToOrder">
49+
<argument name="product" value="$createProduct$"/>
50+
<argument name="productQty" value="1"/>
51+
</actionGroup>
52+
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerInfo">
53+
<argument name="customer" value="$createCustomer$"/>
54+
<argument name="address" value="US_Address_CA"/>
55+
</actionGroup>
56+
<actionGroup ref="SelectCashOnDeliveryPaymentMethodActionGroup" stepKey="selectPaymentMethod"/>
57+
<actionGroup ref="OrderSelectFlatRateShippingActionGroup" stepKey="selectFlatRate"/>
58+
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
59+
<grabTextFrom selector="|Order # (\d+)|" stepKey="orderNumber"/>
60+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage1"/>
61+
<click selector="{{AdminOrdersGridSection.allCheckbox}}" stepKey="clickSelectAll"/>
62+
<openNewTab stepKey="openNewTab"/>
63+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage">
64+
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
65+
</actionGroup>
66+
<waitForPageLoad stepKey="waitForPageLoad2" time="7"/>
67+
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
68+
<argument name="product" value="$$createProduct$$"/>
69+
<argument name="productCount" value="1"/>
70+
</actionGroup>
71+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromCart"/>
72+
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillNewShippingAddress">
73+
<argument name="customer" value="$$createCustomer$$" />
74+
<argument name="address" value="US_Address_TX"/>
75+
</actionGroup>
76+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="setShippingMethodFreeShipping">
77+
<argument name="shippingMethodName" value="Flat Rate"/>
78+
</actionGroup>
79+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutReview"/>
80+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
81+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="guestPlaceOrder" />
82+
<grabTextFrom selector="//div[contains(@class, 'checkout-success')]//p/span" stepKey="grabOrderNumber2"/>
83+
<switchToPreviousTab stepKey="switchToPreviousTab"/>
84+
<click selector="{{AdminOrdersGridSection.orderActions}}" stepKey="clickOnActionsDropdown"/>
85+
<click selector="//div[contains(concat(' ',normalize-space(@class),' '),' row-gutter ')]//span[text()='Cancel']" stepKey="clickStatus"/>
86+
<waitForPageLoad stepKey="waitForPageLoad"/>
87+
<actionGroup ref="AdminCheckOrderStatusInGridActionGroup" stepKey="seeOrderStatusInGrid">
88+
<argument name="orderId" value="$orderNumber"/>
89+
<argument name="status" value="Canceled"/>
90+
</actionGroup>
91+
<actionGroup ref="AdminCheckOrderStatusInGridActionGroup" stepKey="seeOrderStatusInGrid1">
92+
<argument name="orderId" value="$grabOrderNumber2"/>
93+
<argument name="status" value="Pending"/>
94+
</actionGroup>
95+
</test>
96+
</tests>

0 commit comments

Comments
 (0)