Skip to content

Commit 4f1f7bc

Browse files
committed
MAGETWO-97899: [FT] [MFTF] AdminAvailabilityCreditMemoWithNoPaymentTest fails because of bad design
1 parent 4c57fe0 commit 4f1f7bc

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@
4747

4848
<actionGroup name="SubmitInvoice">
4949
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
50+
<waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForMessageAppears"/>
51+
<see selector="{{AdminMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeInvoiceCreateSuccess"/>
5052
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderId"/>
5153
<seeInCurrentUrl url="{{AdminOrderDetailsPage.url('$grabOrderId')}}" stepKey="seeViewOrderPageInvoice"/>
52-
<see selector="{{AdminMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeInvoiceCreateSuccess"/>
5354
</actionGroup>
5455
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Section/AdminInvoiceMainActionsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminInvoiceMainActionsSection">
12-
<element name="submitInvoice" type="button" selector=".action-default.scalable.save.submit-button.primary" timeout="30"/>
12+
<element name="submitInvoice" type="button" selector=".action-default.scalable.save.submit-button.primary" timeout="60"/>
1313
</section>
1414
</sections>

app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,14 @@
7272
<click selector="{{AdminOrderFormActionSection.submitOrder}}" after="selectFreeShippingOption" stepKey="clickSubmitOrder"/>
7373

7474
<!--Click *Invoice* button-->
75-
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
76-
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" after="clickInvoiceButton" stepKey="seeNewInvoiceInPageTitle"/>
77-
<waitForPageLoad stepKey="waitForInvoicePageOpened"/>
78-
79-
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
80-
<see userInput="The invoice has been created." stepKey="seeCorrectMessage"/>
75+
<actionGroup ref="StartCreateInvoiceFromOrderPage" stepKey="startCreateInvoice"/>
76+
<actionGroup ref="SubmitInvoice" stepKey="submitInvoice"/>
8177

8278
<!--Verify that *Credit Memo* button is displayed-->
8379
<seeElement selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="seeCreditMemo"/>
8480
<click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreditMemoItem"/>
8581
<waitForPageLoad stepKey="waitForCreditMemoPageLoaded"/>
86-
<see userInput="New Memo" stepKey="seeNewMemoPage"/>
87-
<seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeUrlOnPage"/>
82+
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoPageTitle"/>
83+
<seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeNewMemoUrlOnPage"/>
8884
</test>
8985
</tests>

0 commit comments

Comments
 (0)