Skip to content

Commit 4f7c9a1

Browse files
committed
ACP2E-4001: Cancel invoice redirects to 404
1 parent 3cb68b9 commit 4f7c9a1

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

app/code/Magento/Paypal/Test/Mftf/Test/AdminPayPalExpressCheckoutCancelInvoiceNotCaptureTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,9 @@
7272
<grabTextFrom selector="{{AdminOrderPaymentInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabTransactionID"/>
7373
<waitForText selector="{{AdminOrderTotalSection.grandTotal}}" userInput="$15.00" stepKey="checkGrandTotal"/>
7474
<!-- Create invoice with not capture amount -->
75-
<waitForElementVisible selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="waitForInvoicebtn"/>
7675
<actionGroup ref="AdminCreateInvoiceNotCaptureActionGroup" stepKey="createInvoiceNotCapture"/>
7776
<!-- Open invoice and cancel it -->
7877
<actionGroup ref="AdminOpenInvoiceFromOrderPageActionGroup" stepKey="openInvoiceFromOrderPage"/>
7978
<actionGroup ref="AdminClickCancelButtonInInvoiceActionGroup" stepKey="clickCancelInvoiceButton"/>
80-
<waitForPageLoad stepKey="waitForLoadPage2"/>
81-
<waitForText userInput="You canceled the invoice." stepKey="seeMessageInvoiceCanceled"/>
8279
</test>
8380
</tests>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminClickCancelButtonInInvoiceActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
</annotations>
1515
<waitForElementClickable selector="{{AdminInvoiceMainActionsSection.cancel}}" stepKey="waitForHoldButtonToBeClickable"/>
1616
<click selector="{{AdminInvoiceMainActionsSection.cancel}}" stepKey="clickCancelButton"/>
17+
<waitForPageLoad stepKey="waitForLoadPage2"/>
18+
<waitForText userInput="You canceled the invoice." stepKey="seeMessageInvoiceCanceled"/>
1719
</actionGroup>
1820
</actionGroups>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminCreateInvoiceNotCaptureActionGroup.xml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AdminCreateInvoiceNotCaptureActionGroup">
12-
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoice"/>
13-
<waitForPageLoad stepKey="waitForInvoicePage"/>
14-
<scrollTo selector="{{AdminInvoiceMainActionsSection.selectModeOfAmount}}" x="0" y="-80" stepKey="scrollToAmount"/>
15-
<selectOption userInput="Not Capture" selector="{{AdminInvoiceMainActionsSection.selectModeOfAmount}}" stepKey="selectNotCaptureUnderAmount"/>
16-
<waitForElementVisible selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="waitForSubmitInvoicebtn"/>
17-
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="submitInvoice"/>
18-
<waitForPageLoad stepKey="waitForLoadPage"/>
19-
<waitForText userInput="The invoice has been created." stepKey="seeMessageInvoiceCreated"/>
11+
<actionGroup name="AdminCreateInvoiceNotCaptureActionGroup" extends="AdminCreateInvoiceActionGroup">
12+
<waitForElementVisible selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="waitForInvoiceButton" before="clickInvoice"/>
13+
<scrollTo selector="{{AdminInvoiceMainActionsSection.selectModeOfAmount}}" x="0" y="-80" stepKey="scrollToAmount" after="waitForInvoicePage"/>
14+
<selectOption userInput="Not Capture" selector="{{AdminInvoiceMainActionsSection.selectModeOfAmount}}" stepKey="selectNotCaptureUnderAmount" after="scrollToAmount"/>
15+
<waitForElementVisible selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="waitForSubmitInvoicebtn" after="selectNotCaptureUnderAmount"/>
2016
</actionGroup>
2117
</actionGroups>

0 commit comments

Comments
 (0)