Skip to content

Commit 6bcb849

Browse files
shashikant.kumarshashikant.kumar
authored andcommitted
AC:5678 Disable shipment comments section and validate Notify Customer by Email is disabled
1 parent 4a1f1b2 commit 6bcb849

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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="AdminDisableEnableShipmentCommentsAndVerifyNotifyCustomerByEmailCheckboxTest">
12+
<annotations>
13+
<title value="Disable shipment comments section and validate Notify Customer by Email is disabled"/>
14+
<description value="Disable shipment comments section and validate Notify Customer by Email is disabled"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="AC-5678"/>
17+
<group value="shipping"/>
18+
</annotations>
19+
<before>
20+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
21+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
22+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
23+
24+
<!--create order for created product and create shipment also-->
25+
<createData entity="CustomerCart" stepKey="createCustomerCart">
26+
<requiredEntity createDataKey="createCustomer"/>
27+
</createData>
28+
<createData entity="CustomerCartItem" stepKey="addCartItem">
29+
<requiredEntity createDataKey="createCustomerCart"/>
30+
<requiredEntity createDataKey="createSimpleProduct"/>
31+
</createData>
32+
<createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress">
33+
<requiredEntity createDataKey="createCustomerCart"/>
34+
</createData>
35+
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="sendCustomerPaymentInformation">
36+
<requiredEntity createDataKey="createCustomerCart"/>
37+
</updateData>
38+
<createData entity="Shipment" stepKey="shipOrder">
39+
<requiredEntity createDataKey="createCustomerCart"/>
40+
</createData>
41+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
42+
43+
<!-- disable Shipment comments-->
44+
<magentoCLI command="config:set sales_email/shipment_comment/enabled 0" stepKey="disableShipmentComments"/>
45+
</before>
46+
<after>
47+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
48+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
49+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
50+
</after>
51+
52+
<!--open created order and then open shipment for that order-->
53+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="openOrdersGrid"/>
54+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/>
55+
<grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createCustomerCart.return$)}}" stepKey="orderId"/>
56+
<actionGroup ref="FilterShipmentGridByOrderIdActionGroup" stepKey="filterForNewlyCreatedShipment">
57+
<argument name="orderId" value="$orderId"/>
58+
</actionGroup>
59+
<actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="selectShipmentFromGrid"/>
60+
61+
<!-- verify "Notify Customer by Email" checkbox should not be displayed.-->
62+
<actionGroup ref="AssertAdminThereIsNoNotifyCustomerByEmailCheckboxActionGroup" stepKey="doNotSeeNotifyCustomerCheckbox"/>
63+
64+
<!-- enable Shipment comments-->
65+
<magentoCLI command="config:set sales_email/shipment_comment/enabled 1" stepKey="enableShipmentComments"/>
66+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="openOrdersGridSecondTime"/>
67+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFiltersSecondTime"/>
68+
<actionGroup ref="FilterShipmentGridByOrderIdActionGroup" stepKey="filterForNewlyCreatedShipmentSecondTime">
69+
<argument name="orderId" value="$orderId"/>
70+
</actionGroup>
71+
<actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="selectShipmentFromGridSecondTime"/>
72+
73+
<!-- verify "Notify Customer by Email" checkbox should be displayed.-->
74+
<seeElement selector="{{AdminShipmentMainActionsSection.notifyCustomerByEmail}}" stepKey="seeCheckbox"/>
75+
</test>
76+
</tests>

0 commit comments

Comments
 (0)