Skip to content

Commit c2c4f29

Browse files
authored
Merge pull request #2730 from magento-borg/MAGETWO-91734
[borg] MAGETWO-91734: Cannot cancel guest order paid with gift card
2 parents be6a01f + 7e10aad commit c2c4f29

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminGridTableSection">
12+
<element name="row" type="text" selector="table.data-grid tbody tr[data-role=row]:nth-of-type({{row}})" parameterized="true"/>
13+
</section>
14+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Section/AdminMainActionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="AdminMainActionsSection">
12+
<element name="save" type="button" selector="#save"/>
13+
<element name="delete" type="button" selector="#delete"/>
1214
</section>
1315
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderActionGroup.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,14 @@
134134
</arguments>
135135
<see selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" userInput="{{product.sku}}" stepKey="seeSkuInItemsOrdered"/>
136136
</actionGroup>
137+
138+
<!--Cancel order that is in pending status-->
139+
<actionGroup name="cancelPendingOrder">
140+
<click selector="{{AdminOrderDetailsMainActionsSection.cancel}}" stepKey="clickCancelOrder"/>
141+
<waitForElement selector="{{AdminConfirmationModalSection.message}}" stepKey="waitForCancelConfirmation"/>
142+
<see selector="{{AdminConfirmationModalSection.message}}" userInput="Are you sure you want to cancel this order?" stepKey="seeConfirmationMessage"/>
143+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmOrderCancel"/>
144+
<see selector="{{AdminMessagesSection.success}}" userInput="You canceled the order." stepKey="seeCancelSuccessMessage"/>
145+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Canceled" stepKey="seeOrderStatusCanceled"/>
146+
</actionGroup>
137147
</actionGroups>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Section/AdminOrderTotalSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="subTotal" type="text" selector=".order-subtotal-table tbody tr.col-0>td span.price"/>
1313
<element name="grandTotal" type="text" selector=".order-subtotal-table tfoot tr.col-0>td span.price"/>
1414
<element name="shippingAndHandling" type="text" selector="//table[contains(@class, 'order-subtotal-table')]//td[normalize-space(.)='Shipping &amp; Handling']/following-sibling::td//span[@class='price']"/>
15+
<element name="total" type="text" selector="//table[contains(@class,'order-subtotal-table')]/tbody/tr/td[contains(text(), '{{total}}')]/following-sibling::td/span/span[contains(@class, 'price')]" parameterized="true"/>
1516
</section>
1617
</sections>

0 commit comments

Comments
 (0)