Skip to content

Commit 1c63159

Browse files
author
Davit_Zakharyan
committed
MAGETWO-36337: Not user-friendly behaviour of "Save in address book" check-box inside "Shipping Address" section on "create Order" Admin page
- Added automated test script.
1 parent 54fac76 commit 1c63159

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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="AdminSaveInAddressBookCheckboxStateTest">
12+
<annotations>
13+
<title value="'Save in address book' check-box inside 'Shipping Address' section on 'create Order' Admin page"/>
14+
<description value="'Save in address book' check-box inside 'Shipping Address' section on 'create Order' Admin page"/>
15+
<features value="Sales"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MAGETWO-36337"/>
18+
<useCaseId value="MAGETWO-99320"/>
19+
<group value="sales"/>
20+
</annotations>
21+
<before>
22+
<!-- Create customer, category, product and log in -->
23+
<comment userInput="Create customer, category, product and log in" stepKey="createTestData"/>
24+
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
25+
<createData entity="ApiCategory" stepKey="createCategory"/>
26+
<createData entity="ApiSimpleProduct" stepKey="createSimpleProduct">
27+
<requiredEntity createDataKey="createCategory"/>
28+
</createData>
29+
<actionGroup ref="LoginActionGroup" stepKey="login"/>
30+
</before>
31+
<after>
32+
<!-- Delete created data and log out -->
33+
<comment userInput="Delete created data and log out" stepKey="deleteDataAndLogOut"/>
34+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
35+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
36+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
37+
<actionGroup ref="logout" stepKey="logOut"/>
38+
</after>
39+
<!-- Create new order and choose an existing customer -->
40+
<comment userInput="Create new order and choose an existing customer" stepKey="createOrderAndAddCustomer"/>
41+
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderPage">
42+
<argument name="customer" value="$$createCustomer$$"/>
43+
</actionGroup>
44+
<!-- Add simple product to order -->
45+
<comment userInput="Add simple product to order" stepKey="addSimpleProdToOrder"/>
46+
<actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder">
47+
<argument name="product" value="$$createSimpleProduct$$"/>
48+
</actionGroup>
49+
<!-- Just in case uncheck and check 'Same as Billing Address checkbox' -->
50+
<comment userInput="Just in case uncheck and check 'Same as Billing Address checkbox'" stepKey="uncheckAndCheckAgain"/>
51+
<uncheckOption selector="{{AdminOrderFormShippingAddressSection.SameAsBilling}}" stepKey="unCheckSameAsShippingAddressCheckbox"/>
52+
<waitForPageLoad stepKey="waitPageToLoad1"/>
53+
<checkOption selector="{{AdminOrderFormShippingAddressSection.SameAsBilling}}" stepKey="checkSameAsShippingAddressCheckbox"/>
54+
<waitForPageLoad stepKey="waitPageToLoad2"/>
55+
<!-- Check 'Save in address book' checkbox in 'Billing Address' section -->
56+
<comment userInput="Check 'Save in address book' checkbox in Billing Address section" stepKey="checkSaveInAddressBookCheckbox"/>
57+
<checkOption selector="{{AdminOrderFormBillingAddressSection.SaveAddress}}" stepKey="checkSaveBillingAddressCheckbox"/>
58+
<!-- See if 'Save in Address Book' checkbox is selected in 'Shipping Address' section -->
59+
<comment userInput="'Save in Address Book' checkbox is checked in 'Shipping Address' section" stepKey="checkIfCheckboxIsChecked"/>
60+
<seeCheckboxIsChecked selector="{{AdminOrderFormShippingAddressSection.SaveAddress}}" stepKey="seeCheckBoxIsSelected"/>
61+
<!-- Uncheck 'Save in Address Book' checkbox in 'Billing Address' section -->
62+
<comment userInput="Uncheck 'Save in Address Book' checkbox in 'Billing Address' section" stepKey="uncheckCheckboxInBillingAddressSection"/>
63+
<uncheckOption selector="{{AdminOrderFormBillingAddressSection.SaveAddress}}" stepKey="uncheckSaveBillingAddressCheckbox"/>
64+
<!-- See if 'Save in Address Book' checkbox is deselected in 'Shipping Address' section -->
65+
<comment userInput="See if 'Save in Address Book' checkbox is unchecked in 'Shipping Address' section" stepKey="seeIfCheckboxIsUnchecked"/>
66+
<dontSeeCheckboxIsChecked selector="{{AdminOrderFormShippingAddressSection.SaveAddress}}" stepKey="seeCheckBoxIsUnchecked"/>
67+
</test>
68+
</tests>

0 commit comments

Comments
 (0)