AdminOrderShipmentProcessingActionGroup.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  3. <!-- Navigate to new order -->
  4. <actionGroup name="TemandoNavigateToNewOrderExistingCustomerCustomStoreView">
  5. <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
  6. <waitForPageLoad stepKey="waitForIndexPageLoad"/>
  7. <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
  8. <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
  9. <waitForPageLoad stepKey="waitForCustomerGridLoad"/>
  10. <fillField userInput="$$simpleuscustomer.email$$" selector="{{AdminOrderCustomersGridSection.emailInput}}" stepKey="filterEmail"/>
  11. <click selector="{{AdminOrderCustomersGridSection.apply}}" stepKey="applyFilter"/>
  12. <waitForPageLoad stepKey="waitForFilteredCustomerGridLoad"/>
  13. <click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/>
  14. <waitForPageLoad stepKey="waitForCreateOrderPageLoad" />
  15. <seeElement stepKey="seeSelectAStore" selector="{{TemandoSalesOrderSection.SelectAStore}}" />
  16. <conditionalClick selector="{{TemandoSalesOrderSection.CustomStoreLabel(customStore.name)}}"
  17. dependentSelector="{{TemandoSalesOrderSection.SelectAStore}}"
  18. visible="true"
  19. stepKey="clickStoreView" />
  20. <waitForPageLoad stepKey="waitForNewOrderPage" />
  21. </actionGroup>
  22. <!-- Select standard shipping -->
  23. <actionGroup name="AdminOrderSelectStandardShipping">
  24. <click selector="{{AdminOrderFormPaymentSection.header}}" stepKey="unfocus"/>
  25. <waitForPageLoad stepKey="waitForJavascriptToFinish"/>
  26. <click selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="clickShippingMethods"/>
  27. <waitForElementVisible selector="{{TemandoSalesOrderSection.shippingMethods}}" stepKey="waitForShippingOptions"/>
  28. <see stepKey="seeMagentoShippingItems" userInput="Magento Shipping" />
  29. <selectOption selector="{{TemandoSalesOrderSection.standardShippingOption}}" userInput="Standard Shipping" stepKey="selectStandardShipping" />
  30. <waitForLoadingMaskToDisappear stepKey="waitForStandardShippingSelection" />
  31. </actionGroup>
  32. <!-- Verify the order was placed -->
  33. <actionGroup name="TemandoVerifyOrderWasPlaced">
  34. <arguments>
  35. <argument name="orderId" type="string" />
  36. </arguments>
  37. <fillField selector="{{AdminOrdersGridSection.search}}" userInput="{{orderId}}" stepKey="fillOrderNum"/>
  38. <click selector="{{AdminOrdersGridSection.submitSearch}}" stepKey="submitSearchOrderNum"/>
  39. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearOnSearch"/>
  40. <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
  41. <waitForPageLoad stepKey="waitForOrderToLoad" />
  42. <see stepKey="seeShippingOrderId" userInput="Magento Shipping Order ID" />
  43. </actionGroup>
  44. <!-- Lick the stamp and send it -->
  45. <actionGroup name="TemandoShipOrder">
  46. <arguments>
  47. <argument name="orderId" type="string" />
  48. <argument name="originLocation" type="string" defaultValue="{{TemandoLocationLabels.US}}" />
  49. <argument name="packageType" type="string" defaultValue="{{TemandoPackageLabels.SmallBox}}" />
  50. <argument name="packageWeight" type="string" defaultValue="1" />
  51. </arguments>
  52. <click stepKey="clickShipOrder" selector="{{TemandoSalesOrderSection.buttonShip}}" />
  53. <seeInCurrentUrl stepKey="seeShipmentPageUrl" url="{{AdminShipmentNewPage.url}}" />
  54. <waitForPageLoad stepKey="waitForNewShipmentPage" />
  55. <waitForLoadingMaskToDisappear stepKey="waitForShipmentForm" />
  56. <scrollTo stepKey="scrollToShipmentReference" selector="{{TemandoShipmentSection.customerReference}}" y="-85" />
  57. <seeInField stepKey="seeCustomerReference" selector="{{TemandoShipmentSection.customerReference}}" userInput="{{orderId}}" />
  58. <waitForElementVisible selector="{{TemandoShipmentSection.originLocation}}" stepKey="waitForOriginLocations" />
  59. <seeOptionIsSelected selector="{{TemandoShipmentSection.originLocation}}" userInput="{{TemandoLocationLabels.US}}" stepKey="seeDefaultLocationSelected" />
  60. <selectOption selector="{{TemandoShipmentSection.originLocation}}" userInput="{{originLocation}}" stepKey="selectOriginLocation" />
  61. <waitForElementVisible selector="{{TemandoShipmentSection.packageType}}" stepKey="waitForPackages" />
  62. <selectOption selector="{{TemandoShipmentSection.packageType}}" userInput="{{packageType}}" stepKey="selectPackageType" />
  63. <fillField stepKey="fillPackageWeight" selector="{{TemandoShipmentSection.packageWeight}}" userInput="{{packageWeight}}" />
  64. <scrollTo stepKey="scrollToGetQuotes" selector="{{TemandoShipmentSection.getQuotes}}" y="-85" />
  65. <seeCheckboxIsChecked selector="{{TemandoShipmentSection.useCustomerExperience}}" stepKey="seeCustomersChoiceIsSelected" />
  66. <click stepKey="clickGetQuotes" selector="{{TemandoShipmentSection.getQuotes}}" />
  67. <waitForLoadingMaskToDisappear stepKey="waitForQuotes" />
  68. <dontSee stepKey="dontSeeNoQuotes" userInput="{{TemandoQuoteResponses.NoEligibleQuotes}}" />
  69. <dontSee stepKey="dontSeeError" userInput="{{TemandoQuoteResponses.APIError}}" />
  70. <click stepKey="clickBookShipment" selector="{{TemandoShipmentSection.bookShipment}}" />
  71. <waitForLoadingMaskToDisappear stepKey="waitForBookShipment" />
  72. <seeInCurrentUrl stepKey="onViewShipmentPage" url="{{TemandoViewShipmentPage.url}}" />
  73. <waitForPageLoad stepKey="waitForViewShipment" />
  74. <see stepKey="seeMagentoOrderId" userInput="Order # {{orderId}}" />
  75. <see stepKey="seeTemandoOrderId" userInput="Magento Shipping Order ID" />
  76. <see stepKey="seeTemandoShipmentId" userInput="Magento Shipping Shipment ID" />
  77. </actionGroup>
  78. </actionGroups>