FindOrderAndCreateCreditMemoActionGroup.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * This file is part of the Klarna KP module
  5. *
  6. * (c) Klarna Bank AB (publ)
  7. *
  8. * For the full copyright and license information, please view the NOTICE
  9. * and LICENSE files that were distributed with this source code.
  10. */
  11. -->
  12. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  14. <actionGroup name="FindOrderAndCreateCreditMemo">
  15. <amOnPage url="{{OrdersPage.url}}" stepKey="onOrdersPage"/>
  16. <wait stepKey="waitOrderPageLoad" time="5"/>
  17. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask3"/>
  18. <fillField selector="{{OrdersGridSection.search}}" userInput="$kpGrabOrderNumber" stepKey="searchOrderNum"/>
  19. <click selector="{{OrdersGridSection.submitSearch}}" stepKey="submitSearch"/>
  20. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask4"/>
  21. <click selector="{{OrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
  22. <wait stepKey="waitOrderPageLoad2" time="5"/>
  23. <click selector="{{KpOrderDetailsOrderViewSection.invoices}}" stepKey="clickInvoices"/>
  24. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask6"/>
  25. <click selector="{{KpOrderDetailsOrderViewSection.viewInvoice}}" stepKey="clickToViewInvoice"/>
  26. <wait stepKey="waitInvoicePageLoad2" time="5"/>
  27. <click selector="{{KpInvoiceDetailsMainActionsSection.credit_memo}}" stepKey="clickCreditMemo"/>
  28. <wait stepKey="waitCreditMemoPageLoad2" time="5"/>
  29. <fillField selector="{{KpCreditMemoNewSection.returnQuantity}}" userInput="1" stepKey="kpEnterReturnQty"/>
  30. <click selector="{{KpCreditMemoNewSection.updateQtyButton}}" stepKey="kpUpdateReturnQty"/>
  31. <wait stepKey="waitCreditMemoPageLoad3" time="5"/>
  32. <click selector="{{KpCreditMemoNewSection.submitCreditMemo}}" stepKey="clickSubmitCreditMemo"/>
  33. <see selector="{{OrderDetailsMessagesSection.successMessage}}" userInput="You created the credit memo."
  34. stepKey="seeSuccessMessage2"/>
  35. </actionGroup>
  36. </actionGroups>