|
22 | 22 | <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
|
23 | 23 | </actionGroup>
|
24 | 24 |
|
| 25 | + <!--Navigate to create order page (New Order -> Select Customer)--> |
| 26 | + <actionGroup name="navigateToNewOrderPageExistingCustomer"> |
| 27 | + <arguments> |
| 28 | + <argument name="customer"/> |
| 29 | + </arguments> |
| 30 | + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/> |
| 31 | + <waitForPageLoad stepKey="waitForIndexPageLoad"/> |
| 32 | + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/> |
| 33 | + <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/> |
| 34 | + <waitForPageLoad stepKey="waitForCustomerGridLoad"/> |
| 35 | + <fillField userInput="{{customer.email}}" selector="{{AdminOrderCustomersGridSection.emailInput}}" stepKey="filterEmail"/> |
| 36 | + <click selector="{{AdminOrderCustomersGridSection.apply}}" stepKey="applyFilter"/> |
| 37 | + <waitForPageLoad stepKey="waitForFilteredCustomerGridLoad"/> |
| 38 | + <click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/> |
| 39 | + <waitForPageLoad stepKey="waitForCreateOrderPageLoad" /> |
| 40 | + <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/> |
| 41 | + </actionGroup> |
| 42 | + |
25 | 43 | <!--Check the required fields are actually required-->
|
26 | 44 | <actionGroup name="checkRequiredFieldsNewOrderForm">
|
27 | 45 | <seeElement selector="{{AdminOrderFormAccountSection.requiredGroup}}" stepKey="seeCustomerGroupRequired"/>
|
|
84 | 102 | <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
|
85 | 103 | </actionGroup>
|
86 | 104 |
|
| 105 | + <!--Add bundle product to order --> |
| 106 | + <actionGroup name="addBundleProductToOrder"> |
| 107 | + <arguments> |
| 108 | + <argument name="product"/> |
| 109 | + <argument name="quantity" type="string" defaultValue="1"/> |
| 110 | + </arguments> |
| 111 | + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> |
| 112 | + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterBundle"/> |
| 113 | + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchBundle"/> |
| 114 | + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> |
| 115 | + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectBundleProduct"/> |
| 116 | + <waitForElementVisible selector="{{AdminOrderFormBundleProductSection.quantity}}" stepKey="waitForBundleOptionLoad"/> |
| 117 | + <wait time="2" stepKey="waitForOptionsToLoad"/> |
| 118 | + <fillField selector="{{AdminOrderFormBundleProductSection.quantity}}" userInput="{{quantity}}" stepKey="fillQuantity"/> |
| 119 | + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOk"/> |
| 120 | + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> |
| 121 | + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> |
| 122 | + </actionGroup> |
| 123 | + |
| 124 | + <!--Add downloadable product to order --> |
| 125 | + <actionGroup name="addDownloadableProductToOrder"> |
| 126 | + <arguments> |
| 127 | + <argument name="product"/> |
| 128 | + <argument name="link"/> |
| 129 | + <argument name="quantity" defaultValue="1" type="string"/> |
| 130 | + </arguments> |
| 131 | + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> |
| 132 | + <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> |
| 133 | + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterDownloadable"/> |
| 134 | + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchDownloadable"/> |
| 135 | + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> |
| 136 | + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectDownloadableProduct"/> |
| 137 | + <waitForElementVisible selector="{{AdminOrderFormDownloadableProductSection.optionSelect(link.title)}}" stepKey="waitForLinkLoad"/> |
| 138 | + <click selector="{{AdminOrderFormDownloadableProductSection.optionSelect(link.title)}}" stepKey="selectLink"/> |
| 139 | + <fillField selector="{{AdminOrderFormDownloadableProductSection.quantity}}" userInput="{{quantity}}" stepKey="setQuantity"/> |
| 140 | + <click selector="{{AdminOrderFormDownloadableProductSection.ok}}" stepKey="confirmConfiguration"/> |
| 141 | + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> |
| 142 | + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> |
| 143 | + </actionGroup> |
| 144 | + |
| 145 | + <!--Add grouped product option to order --> |
| 146 | + <actionGroup name="addGroupedProductOptionToOrder"> |
| 147 | + <arguments> |
| 148 | + <argument name="product"/> |
| 149 | + <argument name="option"/> |
| 150 | + <argument name="quantity" type="string" defaultValue="1"/> |
| 151 | + </arguments> |
| 152 | + |
| 153 | + <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/> |
| 154 | + <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterGrouped"/> |
| 155 | + <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchGrouped"/> |
| 156 | + <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/> |
| 157 | + <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectGroupedProduct"/> |
| 158 | + <waitForElementVisible selector="{{AdminOrderFormGroupedProductSection.optionQty(option.sku)}}" stepKey="waitForGroupedOptionLoad"/> |
| 159 | + <wait time="2" stepKey="waitForOptionsToLoad"/> |
| 160 | + <fillField selector="{{AdminOrderFormGroupedProductSection.optionQty(option.sku)}}" userInput="{{quantity}}" stepKey="fillOptionQuantity"/> |
| 161 | + <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOk"/> |
| 162 | + <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/> |
| 163 | + <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/> |
| 164 | + </actionGroup> |
| 165 | + |
87 | 166 | <!--Fill customer billing address-->
|
88 | 167 | <actionGroup name="fillOrderCustomerInformation">
|
89 | 168 | <arguments>
|
|
0 commit comments