Skip to content

Commit 7cf16a1

Browse files
authored
Merge pull request magento#111 from magento-pangolin/MC-4757
MC-4757
2 parents d51d9d7 + 4532233 commit 7cf16a1

File tree

7 files changed

+234
-3
lines changed

7 files changed

+234
-3
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteAttributeSetTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<stories value="Attribute sets"/>
1414
<title value="Delete Attribute Set"/>
1515
<description value="Admin should be able to delete an attribute set"/>
16-
<testCaseId value="MC-4413"/>
16+
<testCaseId value="MC-10889"/>
1717
<severity value="CRITICAL"/>
1818
<group value="mtf_migrated"/>
1919
</annotations>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminCustomerActivitiesShoppingCartSection">
12+
<element name="productName" type="text" selector="//div[@id='sidebar_data_cart']//td[@class='col-item']"/>
13+
<element name="productPrice" type="text" selector="//div[@id='sidebar_data_cart']//td[@class='col-price']"/>
14+
<element name="addToOrder" type="checkbox" selector="//input[contains(@id, 'sidebar-add_cart_item')]"/>
15+
</section>
16+
</sections>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminCustomerCreateNewOrderSection">
12+
<element name="updateChangesBtn" type="button" selector=".order-sidebar .actions .action-default.scalable" timeout="30"/>
13+
<element name="productName" type="text" selector="#order-items_grid span[id*=order_item]"/>
14+
<element name="productPrice" type="text" selector=".even td[class=col-price] span[class=price]"/>
15+
<element name="productQty" type="input" selector="td[class=col-qty] input"/>
16+
</section>
17+
</sections>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="saveAndContinue" type="button" selector="#save_and_continue" timeout="30"/>
1414
<element name="resetPassword" type="button" selector="#resetPassword" timeout="30"/>
1515
<element name="manageShoppingCart" type="button" selector="#manage_quote" timeout="30"/>
16+
<element name="createOrderBtn" type="button" selector="#order" timeout="30"/>
1617
</section>
1718
</sections>
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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="AddConfigurableProductToOrderFromShoppingCartTest">
12+
<annotations>
13+
<features value="Sales"/>
14+
<stories value="Add Products to Order from Shopping Cart"/>
15+
<title value="Add configurable product to order from shopping cart test"/>
16+
<description value="Add configurable product to order from shopping cart"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-16008"/>
19+
<group value="sales"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<!-- Create customer -->
24+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
25+
26+
<!-- Create category -->
27+
<createData entity="_defaultCategory" stepKey="createCategory"/>
28+
29+
<!-- Create configurable product -->
30+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
31+
<requiredEntity createDataKey="createCategory"/>
32+
</createData>
33+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
34+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption">
35+
<requiredEntity createDataKey="createConfigProductAttribute"/>
36+
</createData>
37+
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
38+
<requiredEntity createDataKey="createConfigProductAttribute"/>
39+
</createData>
40+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption">
41+
<requiredEntity createDataKey="createConfigProductAttribute"/>
42+
</getData>
43+
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct">
44+
<requiredEntity createDataKey="createConfigProductAttribute"/>
45+
<requiredEntity createDataKey="getConfigAttributeOption"/>
46+
<requiredEntity createDataKey="createCategory"/>
47+
</createData>
48+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
49+
<requiredEntity createDataKey="createConfigProduct"/>
50+
<requiredEntity createDataKey="createConfigProductAttribute"/>
51+
<requiredEntity createDataKey="getConfigAttributeOption"/>
52+
</createData>
53+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild">
54+
<requiredEntity createDataKey="createConfigProduct"/>
55+
<requiredEntity createDataKey="createConfigChildProduct"/>
56+
</createData>
57+
</before>
58+
<after>
59+
<!-- Admin log out -->
60+
<actionGroup ref="logout" stepKey="logout"/>
61+
62+
<!-- Customer log out -->
63+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
64+
65+
<!-- Delete customer -->
66+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
67+
68+
<!-- Delete configurable product data -->
69+
<deleteData createDataKey="createConfigChildProduct" stepKey="deleteConfigChildProduct"/>
70+
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
71+
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
72+
73+
<!-- Delete category -->
74+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
75+
</after>
76+
77+
<!-- Login as customer -->
78+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
79+
<argument name="Customer" value="$$createCustomer$$"/>
80+
</actionGroup>
81+
82+
<!-- Add configurable product to the cart -->
83+
<actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart">
84+
<argument name="urlKey" value="$$createConfigProduct.custom_attributes[url_key]$$" />
85+
<argument name="productAttribute" value="$$createConfigProductAttribute.default_value$$"/>
86+
<argument name="productOption" value="$$getConfigAttributeOption.value$$"/>
87+
<argument name="qty" value="1"/>
88+
</actionGroup>
89+
90+
<!-- Login as admin -->
91+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
92+
93+
<!-- Search and open customer -->
94+
<actionGroup ref="AdminFilterCustomerByEmail" stepKey="filterCreatedCustomer">
95+
<argument name="email" value="$$createCustomer.email$$"/>
96+
</actionGroup>
97+
<click selector="{{AdminCustomerGridSection.firstRowEditLink}}" stepKey="clickEditButton"/>
98+
<waitForPageLoad stepKey="waitForPageLoad"/>
99+
100+
<!-- Click create order -->
101+
<click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/>
102+
103+
<!-- Check product in customer's activities in shopping cart section -->
104+
<see selector="{{AdminCustomerActivitiesShoppingCartSection.productName}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductNameInShoppingCartSection"/>
105+
<see selector="{{AdminCustomerActivitiesShoppingCartSection.productPrice}}" userInput="$$createConfigProduct.price$$" stepKey="seeProductPriceInShoppingCartSection"/>
106+
107+
<!-- Click update changes -->
108+
<checkOption selector="{{AdminCustomerActivitiesShoppingCartSection.addToOrder}}" stepKey="checkOptionAddToOrder"/>
109+
<click selector="{{AdminCustomerCreateNewOrderSection.updateChangesBtn}}" stepKey="clickUpdateChangesBtn"/>
110+
<waitForPageLoad stepKey="waitForOrderUpdating"/>
111+
112+
<!-- Assert product in items ordered grid -->
113+
<see selector="{{AdminCustomerCreateNewOrderSection.productName}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductName"/>
114+
<see selector="{{AdminCustomerCreateNewOrderSection.productPrice}}" userInput="$$createConfigProduct.price$$" stepKey="seeProductPrice"/>
115+
<seeInField selector="{{AdminCustomerCreateNewOrderSection.productQty}}" userInput="{{ApiSimpleSingleQty.quantity}}" stepKey="seeProductQty"/>
116+
</test>
117+
</tests>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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="AddSimpleProductToOrderFromShoppingCartTest">
12+
<annotations>
13+
<features value="Sales"/>
14+
<stories value="Add Products to Order from Shopping Cart"/>
15+
<title value="Add simple product to order from shopping cart test"/>
16+
<description value="Add simple product to order from shopping cart"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-16007"/>
19+
<group value="sales"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<!-- Create customer -->
24+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
25+
26+
<!-- Create product -->
27+
<createData entity="SimpleProduct2" stepKey="createProduct"/>
28+
</before>
29+
<after>
30+
<!-- Admin log out -->
31+
<actionGroup ref="logout" stepKey="logout"/>
32+
33+
<!-- Customer log out -->
34+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
35+
36+
<!-- Delete customer -->
37+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
38+
39+
<!-- Delete product -->
40+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
41+
</after>
42+
43+
<!-- Login as customer -->
44+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
45+
<argument name="Customer" value="$$createCustomer$$"/>
46+
</actionGroup>
47+
48+
<!-- Add product to cart -->
49+
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart">
50+
<argument name="product" value="$$createProduct$$"/>
51+
</actionGroup>
52+
53+
<!-- Login as admin -->
54+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
55+
56+
<!-- Search and open customer -->
57+
<actionGroup ref="AdminFilterCustomerByEmail" stepKey="filterCreatedCustomer">
58+
<argument name="email" value="$$createCustomer.email$$"/>
59+
</actionGroup>
60+
<click selector="{{AdminCustomerGridSection.firstRowEditLink}}" stepKey="clickEditButton"/>
61+
<waitForPageLoad stepKey="waitForPageLoad"/>
62+
63+
<!-- Click create order -->
64+
<click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/>
65+
66+
<!-- Check product in customer's activities in shopping cart section -->
67+
<see selector="{{AdminCustomerActivitiesShoppingCartSection.productName}}" userInput="$$createProduct.name$$" stepKey="seeProductNameInShoppingCartSection"/>
68+
<see selector="{{AdminCustomerActivitiesShoppingCartSection.productPrice}}" userInput="$$createProduct.price$$" stepKey="seeProductPriceInShoppingCartSection"/>
69+
70+
<!-- Click update changes -->
71+
<checkOption selector="{{AdminCustomerActivitiesShoppingCartSection.addToOrder}}" stepKey="checkOptionAddToOrder"/>
72+
<click selector="{{AdminCustomerCreateNewOrderSection.updateChangesBtn}}" stepKey="clickUpdateChangesBtn"/>
73+
<waitForPageLoad stepKey="waitForOrderUpdating"/>
74+
75+
<!-- Assert product in items ordered grid -->
76+
<see selector="{{AdminCustomerCreateNewOrderSection.productName}}" userInput="$$createProduct.name$$" stepKey="seeProductName"/>
77+
<see selector="{{AdminCustomerCreateNewOrderSection.productPrice}}" userInput="$$createProduct.price$$" stepKey="seeProductPrice"/>
78+
<seeInField selector="{{AdminCustomerCreateNewOrderSection.productQty}}" userInput="{{ApiSimpleSingleQty.quantity}}" stepKey="seeProductQty"/>
79+
</test>
80+
</tests>

dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MoveShoppingCartProductsOnOrderPageTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Sales\Test\TestCase\MoveShoppingCartProductsOnOrderPageTest" summary="Add Products to Order from Shopping Cart " ticketId="MAGETWO-28540">
1010
<variation name="MoveShoppingCartProductsOnOrderPageTestVariation1">
11-
<data name="tag" xsi:type="string">stable:no</data>
11+
<data name="tag" xsi:type="string">stable:no, mftf_migrated:yes</data>
1212
<data name="product" xsi:type="string">catalogProductSimple::default</data>
1313
<constraint name="Magento\Sales\Test\Constraint\AssertProductInItemsOrderedGrid" />
1414
</variation>
1515
<variation name="MoveShoppingCartProductsOnOrderPageTestVariation2" firstConstraint="Magento\ConfigurableProduct\Test\Constraint\AssertConfigurableProductInItemsOrderedGrid" method="test">
16-
<data name="tag" xsi:type="string">stable:no</data>
16+
<data name="tag" xsi:type="string">stable:no, mftf_migrated:yes</data>
1717
<data name="product" xsi:type="string">configurableProduct::configurable_with_qty_1</data>
1818
<constraint name="Magento\Sales\Test\Constraint\AssertProductInItemsOrderedGrid" />
1919
</variation>

0 commit comments

Comments
 (0)