Skip to content

Commit 975eb39

Browse files
Manjusha.SManjusha.S
authored andcommitted
AC:5678 Disable shipment comments section and validate Notify Customer
2 parents b1ddf06 + 3ddced0 commit 975eb39

File tree

1 file changed

+77
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)