Skip to content

Commit

Permalink
MAGETWO-82385: [CE 2.1.0 rc3] - Cancel an order [configurable product]
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorpetryk committed Feb 5, 2019
1 parent 165e6ae commit f62220b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>

<!--Open order-->
<actionGroup ref="openOrderById" stepKey="openOrderById">
<actionGroup ref="OpenOrderById" stepKey="openOrderById">
<argument name="orderId" value="{$grabOrderNumber}"/>
</actionGroup>

<!--Start create invoice-->
<actionGroup ref="StartCreateInvoiceFromOrderPage" stepKey="startCreateInvoice"/>
<!--Create partial invoice-->
<actionGroup ref="CreatePartialInvoice" stepKey="createPartialInvoice">
<argument name="rowNumber" value="1"/>
<argument name="productSku" value="$createConfigChildProduct.sku$"/>
<argument name="qtyToInvoice" value="1"/>
</actionGroup>
<!--Submit Invoice-->
Expand All @@ -117,7 +117,7 @@
<actionGroup ref="SubmitShipment" stepKey="submitShipment"/>

<!--Cancel order-->
<actionGroup ref="cancelProcessingOrder" stepKey="cancelOrder"/>
<actionGroup ref="CancelProcessingOrder" stepKey="cancelOrder"/>
<!--Check quantities in "Items Ordered" table-->
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Invoiced 1" stepKey="seeInvoicedQuantity"/>
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Shipped 1" stepKey="seeShippedQuantity"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@

<actionGroup name="CreatePartialInvoice">
<arguments>
<argument name="rowNumber" type="string" defaultValue="1"/>
<argument name="productSku" type="string"/>
<argument name="qtyToInvoice" type="string" defaultValue="1"/>
</arguments>
<fillField selector="{{AdminInvoiceItemsSection.itemQtyToInvoice(rowNumber)}}" userInput="{{qtyToInvoice}}" stepKey="changeQtyToInvoice"/>
<fillField selector="{{AdminInvoiceItemsSection.itemQtyToInvoiceBySku(productSku)}}" userInput="{{qtyToInvoice}}" stepKey="changeQtyToInvoice"/>
<waitForElementVisible selector="{{AdminInvoiceItemsSection.updateQtyEnabled}}" stepKey="waitForUpdateQtyEnabled"/>
<click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQty"/>
<waitForLoadingMaskToDisappear stepKey="waitForQtyToUpdate"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</actionGroup>

<!--Cancel order that is in processing status-->
<actionGroup name="cancelProcessingOrder" extends="cancelPendingOrder">
<actionGroup name="CancelProcessingOrder" extends="cancelPendingOrder">
<remove keyForRemoval="seeOrderStatusCanceled"/>
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" after="seeCancelSuccessMessage" userInput="{{CONST.orderStatusComplete}}" stepKey="seeOrderStatusComplete"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="goToGridOrdersPage"/>
<conditionalClick selector="{{AdminOrdersGridSection.clearFilters}}" dependentSelector="{{AdminOrdersGridSection.enabledFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
</actionGroup>
<actionGroup name="openOrderById" extends="filterOrderGridById">
<actionGroup name="OpenOrderById" extends="filterOrderGridById">
<click selector="{{AdminDataGridTableSection.firstRow}}" after="clickOrderApplyFilters" stepKey="openOrderViewPage"/>
<waitForPageLoad after="openOrderViewPage" stepKey="waitForOrderViewPageOpened"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
<element name="updateQty" type="button" selector=".order-invoice-tables tfoot button[data-ui-id='order-items-update-button']"/>
<element name="updateQtyEnabled" type="button" selector=".order-invoice-tables tfoot button[data-ui-id='order-items-update-button'][class='action-default scalable update-button']"/>
<element name="productColumn" type="text" selector="//*[contains(@class,'order-invoice-tables')]//td[@class = 'col-product']//div[contains(text(),'{{productName}}')]" parameterized="true"/>
<element name="itemQtyToInvoiceBySku" type="input" selector="//div[contains(@class,'product-sku-block') and contains(., '{{productSku}}')]/ancestor::tr//td[contains(@class,'col-qty-invoice')]//input" parameterized="true"/>
</section>
</sections>

0 comments on commit f62220b

Please sign in to comment.