|
22 | 22 | <before> |
23 | 23 | <!--Create a customer--> |
24 | 24 | <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
25 | | - <!-- Simple product is created --> |
26 | | -<!-- <createData entity="simpleProductWithoutCategory" stepKey="createProduct">--> |
27 | | -<!-- <field key="price">10.00</field>--> |
28 | | -<!-- </createData>--> |
29 | 25 | <!--Create Simple product--> |
30 | 26 | <createData entity="_defaultCategory" stepKey="createCategory"/> |
31 | 27 | <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
|
44 | 40 | </before> |
45 | 41 | <after> |
46 | 42 | <!-- Delete product and customer--> |
47 | | - <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
48 | | - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
| 43 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 44 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
49 | 45 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 46 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
50 | 47 | <!-- Logout--> |
51 | 48 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
52 | 49 | </after> |
53 | 50 | <!-- Login as Customer --> |
54 | 51 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
55 | 52 | <argument name="Customer" value="$$createCustomer$$"/> |
56 | 53 | </actionGroup> |
57 | | -<!-- <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/>--> |
58 | 54 | <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="amOnSimpleProductPage"/> |
59 | | -<!-- <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart">--> |
60 | | -<!-- <argument name="product" value="$$createSimpleProduct$$"/>--> |
61 | | -<!-- <argument name="productCount" value="1"/>--> |
62 | | -<!-- </actionGroup>--> |
63 | | - <!-- Add product 1 to cart --> |
64 | | -<!-- <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">--> |
65 | | -<!-- <argument name="productName" value="$$createSimpleProduct.name$$"/>--> |
66 | | -<!-- </actionGroup>--> |
67 | | - |
68 | 55 | <actionGroup ref="StorefrontAddCategoryProductToCartWithQuantityNewActionGroup" stepKey="addToCartFromStorefrontProductPage1"> |
69 | 56 | <argument name="product" value="$$createSimpleProduct$$"/> |
70 | 57 | <argument name="quantity" value="5"/> |
71 | 58 | </actionGroup> |
72 | | - <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 59 | + <actionGroup ref="StorefrontGoToCheckoutFromMinicartNewActionGroup" stepKey="goToCheckoutFromMinicart"/> |
73 | 60 | <!-- Select shipping --> |
74 | 61 | <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate"> |
75 | 62 | <argument name="shippingMethodName" value="Flat Rate"/> |
|
102 | 89 | <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceAction"/> |
103 | 90 | <fillField selector="{{AdminOrderInvoiceViewSection.invoiceQty}}" userInput="2" stepKey="fillInvoiceQuantity"/> |
104 | 91 | <waitForPageLoad stepKey="wait"/> |
105 | | - <click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceAction1"/> |
106 | 92 | <click selector="{{AdminOrderInvoiceViewSection.updateInvoiceBtn}}" stepKey="clickUpdateQtyInvoiceBtn"/> |
107 | | - <!-- <fillField selector="{{AdminInvoiceTotalSection.invoiceComment}}" userInput="comment" stepKey="writeComment"/>--> |
108 | 93 | <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/> |
109 | 94 | <!-- Assert invoice with shipment success message --> |
110 | 95 | <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/> |
|
115 | 100 | <grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionIDForCaptured"/> |
116 | 101 | <!--Open the comment history tab and assert the comment--> |
117 | 102 | <actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryAfterSubmittingInvoice"/> |
118 | | - <waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $20.00 online. Transaction ID: "{$grabLastTransactionIDForCaptured}"" stepKey="seeOrderHistoryNotesAfterSubmittingInvoice"/> |
119 | | - |
120 | | - <!--Go to invoice page into the order--> |
121 | | - <actionGroup ref="GoToInvoiceIntoOrderActionGroup" stepKey="goToInvoiceIntoOrderPage"/> |
122 | | - |
123 | | -<!-- <click selector="{{StorefrontOrderInvoicesSection.invoiceTab}}" stepKey="clickInvoiceTabOnStorefront"/>--> |
124 | | -<!-- <see selector="{{StorefrontOrderInvoicesSection.grandTotalPrice}}" userInput="128.00" stepKey="seePrice"/>--> |
125 | | - |
| 103 | + <waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $271.00 online. Transaction ID: "{$grabLastTransactionIDForCaptured}"" stepKey="seeOrderHistoryNotesAfterSubmittingInvoice"/> |
126 | 104 | <!--Go to Invoice Tab and Verify Invoice Grand Total--> |
127 | | - <actionGroup ref="GoToInvoiceIntoOrderActionGroup" stepKey="goToInvoiceIntoOrder1"/> |
128 | | - <see selector="{{AdminInvoiceTotalSection.grandTotal}}" userInput="$45" stepKey="seeInvoiceSubTotal1"/> |
129 | | - |
130 | | - <!--Assert the authorization transaction is present in transaction grid--> |
131 | | -<!-- <actionGroup ref="AdminAssertTransactionTypeInTransactionTabActionGroup" stepKey="assertTransactionTypeHasAuthorization">--> |
132 | | -<!-- <argument name="transactionType" value="authorization"/>--> |
133 | | -<!-- </actionGroup>--> |
134 | | - |
135 | | - <!--Assert the authorization transaction is present in transaction grid--> |
136 | | - <actionGroup ref="AdminOpenTransactionsTabActionGroup" stepKey="assertTransactionTypeHasAuthorization"> |
| 105 | + <click selector="{{StorefrontOrderInvoicesSection.invoiceTab1}}" stepKey="clickInvoiceTabOnStorefront"/> |
| 106 | + <click selector="{{StorefrontOrderInvoicesSection.clickView}}" stepKey="clickViewButton"/> |
| 107 | + <see selector="{{AdminInvoiceTotalSection.grandTotal}}" userInput="$271.00" stepKey="seeInvoiceSubTotal1"/> |
| 108 | + <waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClickedAfterAsserting"/> |
| 109 | + <click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButtonAfterAsserting"/> |
| 110 | + <actionGroup ref="AdminAssertTransitionTypeStatusNewActionGroup" stepKey="assertTransactionTypeStatusForAuthorization"> |
137 | 111 | <argument name="transactionType" value="authorization"/> |
| 112 | + <argument name="transitionTypeStatus" value="No"/> |
138 | 113 | </actionGroup> |
139 | | - <!--Assert the authorization transaction is present in transaction grid--> |
140 | | - <actionGroup ref="AdminOpenTransactionsTabActionGroup" stepKey="assertTransactionTypeHasCapture"> |
| 114 | + <actionGroup ref="AdminAssertTransitionTypeStatusNewActionGroup" stepKey="assertTransactionTypeStatusForCapture"> |
141 | 115 | <argument name="transactionType" value="capture"/> |
| 116 | + <argument name="transitionTypeStatus" value="No"/> |
142 | 117 | </actionGroup> |
143 | | - |
144 | 118 | </test> |
145 | 119 | </tests> |
0 commit comments