Skip to content

Commit 1b48348

Browse files
committed
Covering changes by MFTF
1 parent 32fda1c commit 1b48348

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertAdminThereIsNoNotifyCustomerByEmailCheckboxActionGroup">
12+
<dontSeeElement selector="{{AdminShipmentMainActionsSection.notifyCustomerByEmail}}" stepKey="doNotSeeCheckbox"/>
13+
</actionGroup>
14+
</actionGroups>

app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminShipmentMainActionsSection">
1212
<element name="submitShipment" type="button" selector="button.action-default.save.submit-button" timeout="60"/>
13+
<element name="notifyCustomerByEmail" type="checkbox" selector="input#history_notify"/>
1314
</section>
1415
</sections>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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="AdminDisableShipmentCommentsTest">
12+
<annotations>
13+
<stories value="There is no Notify Customer by Email checkbox when shipment comments are disabled"/>
14+
<title value="Admin user can disable shipment comments"/>
15+
<description value="Disabling Shipment comments"/>
16+
<severity value="MAJOR"/>
17+
<group value="shipping"/>
18+
</annotations>
19+
20+
<before>
21+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
22+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
23+
<createData entity="CustomerCart" stepKey="createCustomerCart">
24+
<requiredEntity createDataKey="createCustomer"/>
25+
</createData>
26+
<createData entity="CustomerCartItem" stepKey="addCartItem">
27+
<requiredEntity createDataKey="createCustomerCart"/>
28+
<requiredEntity createDataKey="createSimpleProduct"/>
29+
</createData>
30+
<createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress">
31+
<requiredEntity createDataKey="createCustomerCart"/>
32+
</createData>
33+
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="sendCustomerPaymentInformation">
34+
<requiredEntity createDataKey="createCustomerCart"/>
35+
</updateData>
36+
<createData entity="Shipment" stepKey="shipOrder">
37+
<requiredEntity createDataKey="createCustomerCart"/>
38+
</createData>
39+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
40+
<magentoCLI command="config:set sales_email/shipment_comment/enabled 0" stepKey="disableShipmentComments"/>
41+
</before>
42+
<after>
43+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
44+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
45+
<magentoCLI command="config:set sales_email/shipment_comment/enabled 1" stepKey="disableShipmentComments"/>
46+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
47+
</after>
48+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="openOrdersGrid"/>
49+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/>
50+
<grabTextFrom selector="{{AdminOrdersGridSection.orderIdByIncrementId($createCustomerCart.return$)}}" stepKey="orderId"/>
51+
<actionGroup ref="FilterShipmentGridByOrderIdActionGroup" stepKey="filterForNewlyCreatedShipment">
52+
<argument name="orderId" value="$orderId"/>
53+
</actionGroup>
54+
<actionGroup ref="AdminSelectFirstGridRowActionGroup" stepKey="selectShipmentFromGrid"/>
55+
<actionGroup ref="AssertAdminThereIsNoNotifyCustomerByEmailCheckboxActionGroup" stepKey="doNotSeeNotifyCustomerCheckbox"/>
56+
</test>
57+
</tests>

0 commit comments

Comments
 (0)