ViewAndValidateOrderActionGroup.xml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  10. <actionGroup name="ViewAndValidateOrderActionGroup">
  11. <arguments>
  12. <argument name="amount" type="string"/>
  13. <argument name="status" type="string"/>
  14. <argument name="captureStatus" type="string"/>
  15. <argument name="closedStatus" type="string"/>
  16. </arguments>
  17. <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
  18. <click selector="{{AdminMenuSection.sales}}" stepKey="clickSales"/>
  19. <waitForPageLoad stepKey="waitForSalesSubsection"/>
  20. <click selector="{{AdminMenuSection.orders}}" stepKey="clickOrders"/>
  21. <waitForPageLoad stepKey="waitForOrdersGrid" time="30"/>
  22. <click selector="{{OrdersGridSection.viewMostRecentOrder}}" stepKey="viewOrder"/>
  23. <waitForPageLoad stepKey="waitForViewOrder"/>
  24. <click selector="{{ViewOrderSection.openInvoiceForm}}" stepKey="openInvoiceForm"/>
  25. <selectOption selector="{{ViewOrderSection.selectCaptureType}}" stepKey="selectCaptureType" userInput="Capture Online"/>
  26. <click selector="{{ViewOrderSection.submitInvoice}}" stepKey="submitInvoice"/>
  27. <waitForPageLoad stepKey="waitForInvoiceLoad"/>
  28. <click selector="{{ViewOrderSection.commentsHistory}}" stepKey="viewCommentsHistory"/>
  29. <waitForPageLoad stepKey="waitForHistoryLoad"/>
  30. <see userInput="{{amount}}" selector="{{ViewOrderSection.capturedAmountText}}" stepKey="validateCapturedAmount"/>
  31. <see userInput="{{status}}" selector="{{ViewOrderSection.orderStatus}}" stepKey="validateOrderStatus"/>
  32. <click selector="{{ViewOrderSection.invoices}}" stepKey="openInvoices"/>
  33. <waitForPageLoad stepKey="waitForInvoices"/>
  34. <seeElement selector="{{ViewOrderSection.firstInvoice}}" stepKey="seeFirstInvoice"/>
  35. <click selector="{{ViewOrderSection.transactions}}" stepKey="openTransactions"/>
  36. <waitForPageLoad stepKey="waitForTransactions"/>
  37. <see userInput="{{captureStatus}}" selector="{{ViewOrderSection.confirmCapture}}" stepKey="seeCapture"/>
  38. <!-- Enable below line after fix of MC-
  39. <see userInput="{{closedStatus}}" selector="{{ViewOrderSection.confirmClosed}}" stepKey="seeClosed"/>
  40. -->
  41. </actionGroup>
  42. <actionGroup name="ViewAndValidateOrderActionGroupNoSubmit">
  43. <arguments>
  44. <argument name="amount" type="string"/>
  45. <argument name="status" type="string"/>
  46. <argument name="captureStatus" type="string"/>
  47. <argument name="closedStatus" type="string"/>
  48. </arguments>
  49. <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
  50. <click selector="{{AdminMenuSection.sales}}" stepKey="clickSales"/>
  51. <waitForPageLoad stepKey="waitForSalesSubsection"/>
  52. <click selector="{{AdminMenuSection.orders}}" stepKey="clickOrders"/>
  53. <waitForPageLoad stepKey="waitForOrdersGrid" time="30"/>
  54. <click selector="{{OrdersGridSection.viewMostRecentOrder}}" stepKey="viewOrder"/>
  55. <waitForPageLoad stepKey="waitForViewOrder"/>
  56. <click selector="{{ViewOrderSection.commentsHistory}}" stepKey="viewCommentsHistory"/>
  57. <waitForPageLoad stepKey="waitForHistoryLoad"/>
  58. <see userInput="{{amount}}" selector="{{ViewOrderSection.capturedAmountTextUnsubmitted}}" stepKey="validateCapturedAmount"/>
  59. <see userInput="{{status}}" selector="{{ViewOrderSection.orderStatus}}" stepKey="validateOrderStatus"/>
  60. <click selector="{{ViewOrderSection.invoices}}" stepKey="openInvoices"/>
  61. <waitForPageLoad stepKey="waitForInvoices"/>
  62. <seeElement selector="{{ViewOrderSection.firstInvoice}}" stepKey="seeFirstInvoice"/>
  63. <click selector="{{ViewOrderSection.transactions}}" stepKey="openTransactions"/>
  64. <waitForPageLoad stepKey="waitForTransactions"/>
  65. <see userInput="{{captureStatus}}" selector="{{ViewOrderSection.confirmCapture}}" stepKey="seeCapture"/>
  66. <!-- Enable below line after fix of MC-
  67. <see userInput="{{closedStatus}}" selector="{{ViewOrderSection.confirmClosed}}" stepKey="seeClosed"/>
  68. -->
  69. </actionGroup>
  70. </actionGroups>