|
39 | 39 | <argument name="Customer" value="$createCustomer$"/> |
40 | 40 | </actionGroup> |
41 | 41 |
|
42 | | - <!-- Create an order at Storefront as Customer 1 --> |
| 42 | + <!-- Create an order on Storefront as Customer 1 and open print order page --> |
43 | 43 | <actionGroup ref="CreateOrderToPrintPageWithSelectedPaymentMethodActionGroup" stepKey="createOrderToPrint"> |
44 | 44 | <argument name="Category" value="$createCategory$"/> |
45 | 45 | </actionGroup> |
46 | 46 |
|
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 --> |
48 | 48 | <grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderIdFromURL"/> |
49 | 49 | <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"/> |
57 | 50 |
|
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"/> |
61 | 67 |
|
62 | 68 | <!-- 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" /> |
67 | 73 |
|
68 | 74 | <amOnPage url="{{StorefrontCustomerSignOutPage.url}}" stepKey="signOut"/> |
69 | 75 | <waitForLoadingMaskToDisappear stepKey="waitSignOutPage"/> |
|
79 | 85 | </actionGroup> |
80 | 86 |
|
81 | 87 | <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"> |
83 | 89 | <argument name="expectedUrl">sales/order/print/order_id/</argument> |
84 | 90 | <argument name="expectedUrlComparisonType">COMPARISON_PATH_SUBSET_MATCH</argument> |
85 | 91 | </helper> |
|
0 commit comments