Skip to content

Commit d3d4b33

Browse files
committed
ACP2E-1369: improved mftf
1 parent 4df00c8 commit d3d4b33

File tree

1 file changed

+29
-32
lines changed

1 file changed

+29
-32
lines changed

app/code/Magento/Sales/Test/Mftf/Test/AdminOrderCheckCommentsHistoryTest.xml

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,49 @@
2020
<group value="sales"/>
2121
</annotations>
2222
<before>
23-
23+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2424
<createData entity="_defaultCategory" stepKey="createCategory"/>
2525
<createData entity="SimpleProduct" stepKey="createProduct">
2626
<requiredEntity createDataKey="createCategory"/>
2727
</createData>
28-
29-
<!-- Customer is created -->
3028
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
31-
<!-- Login to Admin -->
3229
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
33-
3430
</before>
3531
<after>
3632
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
37-
<!-- Delete products -->
3833
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
39-
40-
<!-- Delete Category -->
4134
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
42-
43-
<!-- Delete Customer -->
4435
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
4536
</after>
4637

47-
<!-- Create new customer order -->
48-
<comment userInput="Create new customer order" stepKey="createNewCustomerOrderComment"/>
49-
<actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
50-
<argument name="customer" value="$$createCustomer$$"/>
51-
</actionGroup>
52-
<!-- Add Simple product to order -->
53-
<comment userInput="Add Simple product to order" stepKey="addSimpleProductToOrderComment"/>
54-
<actionGroup ref="AddSimpleProductToOrderActionGroup" stepKey="addSimpleProductToTheOrder">
55-
<argument name="product" value="$$createProduct$$"/>
38+
<!-- Create order, invoice, shipment and credit memo -->
39+
<createData entity="CustomerCart" stepKey="createCustomerCart">
40+
<requiredEntity createDataKey="createCustomer"/>
41+
</createData>
42+
<createData entity="CustomerCartItem" stepKey="addCartItem">
43+
<requiredEntity createDataKey="createCustomerCart"/>
44+
<requiredEntity createDataKey="createProduct"/>
45+
</createData>
46+
<createData entity="CustomerAddressInformation" stepKey="addCustomerOrderAddress">
47+
<requiredEntity createDataKey="createCustomerCart"/>
48+
</createData>
49+
<updateData createDataKey="createCustomerCart" entity="CustomerOrderPaymentMethod" stepKey="createFirstOrder">
50+
<requiredEntity createDataKey="createCustomerCart"/>
51+
</updateData>
52+
<createData entity="Invoice" stepKey="invoiceOrder">
53+
<requiredEntity createDataKey="createCustomerCart"/>
54+
</createData>
55+
<createData entity="Shipment" stepKey="createShipment">
56+
<requiredEntity createDataKey="createCustomerCart"/>
57+
</createData>
58+
<createData entity="CreditMemo" stepKey="createCreditMemo">
59+
<requiredEntity createDataKey="createCustomerCart"/>
60+
</createData>
61+
62+
<!-- Open Admin Order page -->
63+
<actionGroup ref="AdminOpenOrderViewPageByOrderIdActionGroup" stepKey="openOrder">
64+
<argument name="orderId" value="$createCustomerCart.return$"/>
5665
</actionGroup>
57-
<!-- Select FlatRate shipping method -->
58-
<comment userInput="Select FlatRate shipping method" stepKey="selectFlatRateShippingMethodComment"/>
59-
<actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/>
60-
<!-- Submit order -->
61-
<comment userInput="Submit order" stepKey="submitOrderComment"/>
62-
<actionGroup ref="AdminOrderClickSubmitOrderActionGroup" stepKey="submitOrder" />
63-
<!-- Verify order information -->
64-
<comment userInput="Verify order information" stepKey="verifyOrderInformationComment"/>
65-
<actionGroup ref="VerifyCreatedOrderInformationActionGroup" stepKey="verifyCreatedOrderInformation"/>
66-
<comment userInput="BIC workaround" stepKey="orderId"/>
67-
<grabTextFrom selector="|Order # (\d+)|" stepKey="orderNumber"/>
6866

6967
<!--Go to Comments history and switch to Information -->
7068
<click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory1"/>
@@ -74,8 +72,7 @@
7472
<!--Go to Comments history and don't see the error message -->
7573
<click selector="{{AdminOrderDetailsOrderViewSection.commentsHistory}}" stepKey="goToCommentsHistory2"/>
7674
<waitForPageLoad stepKey="waitForCommentsHistoryPage"/>
77-
<see userInput="Order Placed by Store Administrator" stepKey="seeMessageOrderCreatedByAdmin"/>
75+
<see userInput="Notes for this Order" stepKey="seeMessageNotesForThisOrder"/>
7876
<dontSee userInput="A technical problem with the server created an error" stepKey="dontSeeTechnicalErrorMessageTwo"/>
79-
8077
</test>
8178
</tests>

0 commit comments

Comments
 (0)