Skip to content

Commit e2b578d

Browse files
committed
add mftf test
1 parent 8ab5415 commit e2b578d

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,20 @@
12491249
<requiredEntity type="product_extension_attribute">EavStock777</requiredEntity>
12501250
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
12511251
</entity>
1252+
<entity name="SimpleProduct_zero" type="product">
1253+
<data key="sku" unique="suffix">testSku</data>
1254+
<data key="type_id">simple</data>
1255+
<data key="attribute_set_id">4</data>
1256+
<data key="visibility">4</data>
1257+
<data key="name" unique="suffix">testProductName</data>
1258+
<data key="price">0.00</data>
1259+
<data key="urlKey" unique="suffix">testurlkey</data>
1260+
<data key="status">1</data>
1261+
<data key="quantity">777</data>
1262+
<data key="weight">1</data>
1263+
<requiredEntity type="product_extension_attribute">EavStock777</requiredEntity>
1264+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
1265+
</entity>
12521266
<entity name="ApiSimpleOneQty10" type="product2">
12531267
<data key="sku" unique="suffix">api-simple-product</data>
12541268
<data key="type_id">simple</data>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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="AdminCreateCreditMemoWithZeroPriceCheckOrderStatusTest">
12+
<annotations>
13+
<title value="Create Credit Memo with zero total."/>
14+
<description value="Assert order status after create CreditMemo with zero total."/>
15+
<group value="sales"/>
16+
</annotations>
17+
<before>
18+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
19+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
20+
<createData entity="_defaultCategory" stepKey="createCategory"/>
21+
<createData entity="SimpleProduct_zero" stepKey="createProduct">
22+
<requiredEntity createDataKey="createCategory"/>
23+
</createData>
24+
25+
<createData entity="FreeShippinMethodConfig" stepKey="enableFreeShipping"/>
26+
</before>
27+
<after>
28+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
29+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
30+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
31+
<createData entity="FreeShippingMethodDisableConfig" stepKey="disableFreeShipping"/>
32+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
33+
</after>
34+
35+
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderPage">
36+
<argument name="customer" value="$createCustomer$"/>
37+
</actionGroup>
38+
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSecondProduct">
39+
<argument name="product" value="$createProduct$"/>
40+
<argument name="productQty" value="1"/>
41+
</actionGroup>
42+
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerInfo">
43+
<argument name="customer" value="$createCustomer$"/>
44+
<argument name="address" value="US_Address_TX"/>
45+
</actionGroup>
46+
<actionGroup ref="OrderSelectFreeShippingActionGroup" stepKey="selectFlatRate"/>
47+
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
48+
49+
<actionGroup ref="AdminCreateInvoiceAndCreditMemoActionGroup" stepKey="createCreditMemo"/>
50+
51+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeOrderClose">
52+
<argument name="status" value="Closed"/>
53+
</actionGroup>
54+
</test>
55+
</tests>

0 commit comments

Comments
 (0)