12
12
<annotations >
13
13
<features value =" Sales" />
14
14
<stories value =" Create an Invoice via the Admin" />
15
- <title value =" Admin should be able to create an invoice" />
15
+ <title value =" DEPRECATED. Admin should be able to create an invoice" />
16
16
<description value =" Admin should be able to create an invoice" />
17
17
<severity value =" MAJOR" />
18
18
<testCaseId value =" MAGETWO-72096" />
19
19
<group value =" sales" />
20
+ <skip >
21
+ <issueID value =" DEPRECATED" >Use AdminInvoiceOrderTest instead</issueID >
22
+ </skip >
20
23
</annotations >
21
-
22
- <before >
24
+ <before >
23
25
<createData entity =" _defaultCategory" stepKey =" createCategory" />
24
- <createData entity =" _defaultProduct" stepKey =" createSimpleProductApi " >
26
+ <createData entity =" _defaultProduct" stepKey =" createProduct " >
25
27
<requiredEntity createDataKey =" createCategory" />
26
28
</createData >
27
- <createData entity =" GuestCart" stepKey =" createGuestCart" />
28
- <createData entity =" SimpleCartItem" stepKey =" addCartItem" >
29
- <requiredEntity createDataKey =" createGuestCart" />
30
- <requiredEntity createDataKey =" createSimpleProductApi" />
31
- </createData >
32
- <createData entity =" GuestAddressInformation" stepKey =" addGuestOrderAddress" >
33
- <requiredEntity createDataKey =" createGuestCart" />
34
- </createData >
35
- <updateData createDataKey =" createGuestCart" entity =" GuestOrderPaymentMethod" stepKey =" sendGuestPaymentInformation" >
36
- <requiredEntity createDataKey =" createGuestCart" />
37
- </updateData >
38
29
</before >
39
-
40
30
<after >
41
- <deleteData createDataKey =" createCategory" stepKey =" deleteCategory" />
42
- <deleteData createDataKey =" createSimpleProductApi" stepKey =" deleteSimpleProductApi" />
43
31
<actionGroup ref =" AdminLogoutActionGroup" stepKey =" adminLogout" />
32
+ <deleteData createDataKey =" createCategory" stepKey =" deleteProduct1" />
33
+ <deleteData createDataKey =" createProduct" stepKey =" deleteCategory1" />
44
34
</after >
45
35
46
- <actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdmin1" />
47
-
48
- <actionGroup ref =" AdminOpenOrderByEntityIdActionGroup" stepKey =" openOrder" >
49
- <argument name =" entity_id" value =" $createGuestCart.return$" />
50
- </actionGroup >
51
-
52
- <actionGroup ref =" AdminCreateInvoiceActionGroup" stepKey =" createInvoice" />
36
+ <!-- todo: Create an order via the api instead of driving the browser -->
37
+ <amOnPage url =" {{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey =" onCategoryPage" />
38
+ <waitForPageLoad stepKey =" waitForPageLoad1" />
39
+ <moveMouseOver selector =" {{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey =" hoverProduct" />
40
+ <actionGroup ref =" StorefrontClickAddToCartButtonActionGroup" stepKey =" addToCart" />
41
+ <waitForElementVisible selector =" {{StorefrontCategoryMainSection.SuccessMsg}}" time =" 30" stepKey =" waitForProductAdded" />
42
+ <actionGroup ref =" StorefrontClickOnMiniCartActionGroup" stepKey =" clickCart" />
43
+ <click selector =" {{StorefrontMinicartSection.goToCheckout}}" stepKey =" goToCheckout" />
44
+ <waitForPageLoad stepKey =" waitForPageLoad2" />
45
+ <fillField selector =" {{CheckoutShippingGuestInfoSection.email}}" userInput =" {{CustomerEntityOne.email}}" stepKey =" enterEmail" />
46
+ <fillField selector =" {{CheckoutShippingGuestInfoSection.firstName}}" userInput =" {{CustomerEntityOne.firstname}}" stepKey =" enterFirstName" />
47
+ <fillField selector =" {{CheckoutShippingGuestInfoSection.lastName}}" userInput =" {{CustomerEntityOne.lastname}}" stepKey =" enterLastName" />
48
+ <fillField selector =" {{CheckoutShippingGuestInfoSection.street}}" userInput =" {{CustomerAddressSimple.street[0]}}" stepKey =" enterStreet" />
49
+ <fillField selector =" {{CheckoutShippingGuestInfoSection.city}}" userInput =" {{CustomerAddressSimple.city}}" stepKey =" enterCity" />
50
+ <selectOption selector =" {{CheckoutShippingGuestInfoSection.region}}" userInput =" {{CustomerAddressSimple.state}}" stepKey =" selectRegion" />
51
+ <fillField selector =" {{CheckoutShippingGuestInfoSection.postcode}}" userInput =" {{CustomerAddressSimple.postcode}}" stepKey =" enterPostcode" />
52
+ <fillField selector =" {{CheckoutShippingGuestInfoSection.telephone}}" userInput =" {{CustomerAddressSimple.telephone}}" stepKey =" enterTelephone" />
53
+ <waitForLoadingMaskToDisappear stepKey =" waitForLoadingMask" />
54
+ <click selector =" {{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey =" selectFirstShippingMethod" />
55
+ <waitForLoadingMaskToDisappear stepKey =" waitForLoadingMask2" />
56
+ <actionGroup ref =" StorefrontCheckoutClickNextButtonActionGroup" stepKey =" clickNext" />
57
+ <!-- Checkout select Check/Money Order payment -->
58
+ <actionGroup ref =" CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey =" selectCheckMoneyPayment" />
59
+ <waitForElement selector =" {{CheckoutPaymentSection.placeOrder}}" time =" 30" stepKey =" waitForPlaceOrderButton" />
60
+ <click selector =" {{CheckoutPaymentSection.placeOrder}}" stepKey =" clickPlaceOrder" />
61
+ <grabTextFrom selector =" {{CheckoutSuccessMainSection.orderNumber}}" stepKey =" grabOrderNumber" />
62
+ <!-- end todo -->
53
63
54
- <actionGroup ref =" FilterInvoiceGridByOrderIdWithCleanFiltersActionGroup" stepKey =" filterInvoiceGridByOrderId" >
55
- <argument name =" orderId" value =" $createGuestCart.return$" />
56
- </actionGroup >
57
-
58
- <actionGroup ref =" AdminSelectFirstGridRowActionGroup" stepKey =" openInvoiceFromGrid" />
64
+ <actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdmin1" />
59
65
60
- <actionGroup ref =" AdminOrderViewCheckStatusActionGroup" stepKey =" checkIfOrderStatusIsProcessing" >
61
- <argument name =" status" value =" Processing" />
62
- </actionGroup >
66
+ <amOnPage url =" {{AdminOrdersPage.url}}" stepKey =" onOrdersPage" />
67
+ <waitForLoadingMaskToDisappear stepKey =" waitForLoadingMask3" />
68
+ <actionGroup ref =" ClearFiltersAdminDataGridActionGroup" stepKey =" clearGridFilter" />
69
+ <fillField selector =" {{AdminOrdersGridSection.search}}" userInput =" {$grabOrderNumber}" stepKey =" searchOrderNum" />
70
+ <click selector =" {{AdminOrdersGridSection.submitSearch}}" stepKey =" submitSearch" />
71
+ <waitForLoadingMaskToDisappear stepKey =" waitForLoadingMask4" />
63
72
73
+ <actionGroup ref =" AdminOrderGridClickFirstRowActionGroup" stepKey =" clickOrderRow" />
74
+ <actionGroup ref =" AdminClickInvoiceButtonOrderViewActionGroup" stepKey =" clickInvoice" />
75
+ <actionGroup ref =" AdminInvoiceClickSubmitActionGroup" stepKey =" clickSubmitInvoice" />
76
+ <see selector =" {{AdminOrderDetailsMessagesSection.successMessage}}" userInput =" The invoice has been created." stepKey =" seeSuccessMessage" />
77
+ <click selector =" {{AdminOrderDetailsOrderViewSection.invoices}}" stepKey =" clickInvoices" />
78
+ <waitForLoadingMaskToDisappear stepKey =" waitForLoadingMask5" />
79
+ <see selector =" {{AdminOrderDetailsInvoicesSection.content}}" userInput =" {$grabOrderNumber}" stepKey =" seeInvoice1" />
80
+ <see selector =" {{AdminOrderDetailsInvoicesSection.content}}" userInput =" John Doe" stepKey =" seeInvoice2" />
81
+ <click selector =" {{AdminOrderDetailsOrderViewSection.information}}" stepKey =" clickInformation" />
82
+ <waitForLoadingMaskToDisappear stepKey =" waitForOrderInformationTabLoadingMask" />
83
+ <see selector =" {{AdminOrderDetailsInformationSection.orderStatus}}" userInput =" Processing" stepKey =" seeOrderStatus" />
84
+ <amOnPage url =" {{AdminInvoicesPage.url}}" stepKey =" goToInvoices" />
85
+ <waitForLoadingMaskToDisappear stepKey =" waitForLoadingMask6" />
86
+ <actionGroup ref =" ResetProductGridToDefaultViewActionGroup" stepKey =" resetGridInitial" />
87
+ <click selector =" {{AdminInvoicesGridSection.filter}}" stepKey =" clickFilters" />
88
+ <fillField selector =" {{AdminInvoicesFiltersSection.orderNum}}" userInput =" {$grabOrderNumber}" stepKey =" searchOrderNum2" />
89
+ <click selector =" {{AdminInvoicesFiltersSection.applyFilters}}" stepKey =" clickApplyFilters" />
90
+ <click selector =" {{AdminInvoicesGridSection.firstRow}}" stepKey =" clickInvoice2" />
91
+ <see selector =" {{AdminInvoiceDetailsInformationSection.orderStatus}}" userInput =" Processing" stepKey =" seeOrderStatus2" />
64
92
</test >
65
- </tests >
93
+ </tests >
0 commit comments