1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="ViewAndValidateOrderActionGroup">
<arguments>
<argument name="amount" type="string"/>
<argument name="status" type="string"/>
<argument name="captureStatus" type="string"/>
<argument name="closedStatus" type="string"/>
</arguments>
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
<click selector="{{AdminMenuSection.sales}}" stepKey="clickSales"/>
<waitForPageLoad stepKey="waitForSalesSubsection"/>
<click selector="{{AdminMenuSection.orders}}" stepKey="clickOrders"/>
<waitForPageLoad stepKey="waitForOrdersGrid" time="30"/>
<click selector="{{OrdersGridSection.viewMostRecentOrder}}" stepKey="viewOrder"/>
<waitForPageLoad stepKey="waitForViewOrder"/>
<click selector="{{ViewOrderSection.openInvoiceForm}}" stepKey="openInvoiceForm"/>
<selectOption selector="{{ViewOrderSection.selectCaptureType}}" stepKey="selectCaptureType" userInput="Capture Online"/>
<click selector="{{ViewOrderSection.submitInvoice}}" stepKey="submitInvoice"/>
<waitForPageLoad stepKey="waitForInvoiceLoad"/>
<click selector="{{ViewOrderSection.commentsHistory}}" stepKey="viewCommentsHistory"/>
<waitForPageLoad stepKey="waitForHistoryLoad"/>
<see userInput="{{amount}}" selector="{{ViewOrderSection.capturedAmountText}}" stepKey="validateCapturedAmount"/>
<see userInput="{{status}}" selector="{{ViewOrderSection.orderStatus}}" stepKey="validateOrderStatus"/>
<click selector="{{ViewOrderSection.invoices}}" stepKey="openInvoices"/>
<waitForPageLoad stepKey="waitForInvoices"/>
<seeElement selector="{{ViewOrderSection.firstInvoice}}" stepKey="seeFirstInvoice"/>
<click selector="{{ViewOrderSection.transactions}}" stepKey="openTransactions"/>
<waitForPageLoad stepKey="waitForTransactions"/>
<see userInput="{{captureStatus}}" selector="{{ViewOrderSection.confirmCapture}}" stepKey="seeCapture"/>
<!-- Enable below line after fix of MC-
<see userInput="{{closedStatus}}" selector="{{ViewOrderSection.confirmClosed}}" stepKey="seeClosed"/>
-->
</actionGroup>
<actionGroup name="ViewAndValidateOrderActionGroupNoSubmit">
<arguments>
<argument name="amount" type="string"/>
<argument name="status" type="string"/>
<argument name="captureStatus" type="string"/>
<argument name="closedStatus" type="string"/>
</arguments>
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
<click selector="{{AdminMenuSection.sales}}" stepKey="clickSales"/>
<waitForPageLoad stepKey="waitForSalesSubsection"/>
<click selector="{{AdminMenuSection.orders}}" stepKey="clickOrders"/>
<waitForPageLoad stepKey="waitForOrdersGrid" time="30"/>
<click selector="{{OrdersGridSection.viewMostRecentOrder}}" stepKey="viewOrder"/>
<waitForPageLoad stepKey="waitForViewOrder"/>
<click selector="{{ViewOrderSection.commentsHistory}}" stepKey="viewCommentsHistory"/>
<waitForPageLoad stepKey="waitForHistoryLoad"/>
<see userInput="{{amount}}" selector="{{ViewOrderSection.capturedAmountTextUnsubmitted}}" stepKey="validateCapturedAmount"/>
<see userInput="{{status}}" selector="{{ViewOrderSection.orderStatus}}" stepKey="validateOrderStatus"/>
<click selector="{{ViewOrderSection.invoices}}" stepKey="openInvoices"/>
<waitForPageLoad stepKey="waitForInvoices"/>
<seeElement selector="{{ViewOrderSection.firstInvoice}}" stepKey="seeFirstInvoice"/>
<click selector="{{ViewOrderSection.transactions}}" stepKey="openTransactions"/>
<waitForPageLoad stepKey="waitForTransactions"/>
<see userInput="{{captureStatus}}" selector="{{ViewOrderSection.confirmCapture}}" stepKey="seeCapture"/>
<!-- Enable below line after fix of MC-
<see userInput="{{closedStatus}}" selector="{{ViewOrderSection.confirmClosed}}" stepKey="seeClosed"/>
-->
</actionGroup>
</actionGroups>