Skip to content

Commit dd1cc86

Browse files
committed
B2B-2094: [AWS S3] Failed to load gift card order print page
1 parent fa00fec commit dd1cc86

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

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

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,37 @@
3939
<argument name="Customer" value="$createCustomer$"/>
4040
</actionGroup>
4141

42-
<!-- Create an order at Storefront as Customer 1 -->
42+
<!-- Create an order on Storefront as Customer 1 and open print order page -->
4343
<actionGroup ref="CreateOrderToPrintPageWithSelectedPaymentMethodActionGroup" stepKey="createOrderToPrint">
4444
<argument name="Category" value="$createCategory$"/>
4545
</actionGroup>
4646

47-
<!-- Go to 'print order' page by grabbed order id-->
47+
<!-- Go to 'print order' page by grabbed order id and assert browser does not redirect to order history page -->
4848
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderIdFromURL"/>
4949
<comment userInput="BIC workaround" stepKey="waitForPrintWindowToOpen"/>
50-
<switchToWindow stepKey="switchToPrintPage"/>
51-
<waitForElement selector="{{SalesOrderPrintSection.isOrderPrintPage}}" stepKey="checkPrintPage"/>
52-
<openNewTab stepKey="openNewTab"/>
53-
<waitForPageLoad stepKey="waitForNewTabToOpen" />
54-
<switchToNextTab stepKey="switchForward"/>
55-
<waitForElement selector="body" stepKey="waitForNewTab3HTML" />
56-
<amOnPage url="{{StorefrontSalesOrderPrintPage.url({$grabOrderIdFromURL})}}" stepKey="duplicatePrintPage"/>
5750

58-
<waitForPageLoad stepKey="waitForDuplicatePrintWindowToOpen" />
59-
<switchToWindow stepKey="switchToDuplicatePrintPage"/>
60-
<waitForElement selector="{{SalesOrderPrintSection.isOrderPrintPage}}" stepKey="checkDuplicatePrintPage"/>
51+
<helper class="Magento\Ui\Test\Mftf\Helper\UiHelper" method="switchToWindowWithUrlAndClosePrintDialogIfEncountered" stepKey="switchToWindowWithUrlAndClosePrintDialogIfEncountered">
52+
<argument name="expectedUrl">sales/order/print/order_id/{$grabOrderIdFromURL}</argument>
53+
<argument name="expectedUrlComparisonType">COMPARISON_PATH_SUBSET_MATCH</argument>
54+
</helper>
55+
56+
<comment userInput="Step key preserved for backwards compatibility" stepKey="switchToPrintPage"/>
57+
<comment userInput="Step key preserved for backwards compatibility" stepKey="checkPrintPage"/>
58+
59+
<comment userInput="Step key preserved for backwards compatibility" stepKey="openNewTab"/>
60+
<comment userInput="Step key preserved for backwards compatibility" stepKey="waitForNewTabToOpen" />
61+
<comment userInput="Step key preserved for backwards compatibility" stepKey="switchForward"/>
62+
<comment userInput="Step key preserved for backwards compatibility" stepKey="waitForNewTab3HTML" />
63+
<comment userInput="Step key preserved for backwards compatibility" stepKey="duplicatePrintPage"/>
64+
<comment userInput="Step key preserved for backwards compatibility" stepKey="waitForDuplicatePrintWindowToOpen" />
65+
<comment userInput="Step key preserved for backwards compatibility" stepKey="switchToDuplicatePrintPage"/>
66+
<comment userInput="Step key preserved for backwards compatibility" stepKey="checkDuplicatePrintPage"/>
6167

6268
<!-- Log out of customer 1's account -->
63-
<openNewTab stepKey="openNewTab2"/>
64-
<waitForPageLoad stepKey="waitForNewTabToOpen1" />
65-
<switchToNextTab stepKey="switchForward2"/>
66-
<waitForElement selector="body" stepKey="waitForNewTab2HTML" />
69+
<comment userInput="Step key preserved for backwards compatibility" stepKey="openNewTab2"/>
70+
<comment userInput="Step key preserved for backwards compatibility" stepKey="waitForNewTabToOpen1" />
71+
<comment userInput="Step key preserved for backwards compatibility" stepKey="switchForward2"/>
72+
<comment userInput="Step key preserved for backwards compatibility" stepKey="waitForNewTab2HTML" />
6773

6874
<amOnPage url="{{StorefrontCustomerSignOutPage.url}}" stepKey="signOut"/>
6975
<waitForLoadingMaskToDisappear stepKey="waitSignOutPage"/>
@@ -79,7 +85,7 @@
7985
</actionGroup>
8086

8187
<comment userInput="Step key preserved for backwards compatibility" stepKey="waitForPrintWindowToOpen2" />
82-
<helper class="Magento\Ui\Test\Mftf\Helper\UiHelper" method="switchToWindowWithUrlAndClosePrintDialogIfEncountered" stepKey="switchToWindowWithUrlAndClosePrintDialogIfEncountered">
88+
<helper class="Magento\Ui\Test\Mftf\Helper\UiHelper" method="switchToWindowWithUrlAndClosePrintDialogIfEncountered" stepKey="switchToWindowWithUrlAndClosePrintDialogIfEncountered2">
8389
<argument name="expectedUrl">sales/order/print/order_id/</argument>
8490
<argument name="expectedUrlComparisonType">COMPARISON_PATH_SUBSET_MATCH</argument>
8591
</helper>

0 commit comments

Comments
 (0)