FindOrderAndCreateInvoiceActionGroup.xml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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="FindOrderAndCreateInvoice">
  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. <click selector="{{OrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoice"/>
  23. <click selector="{{InvoiceNewSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
  24. <see selector="{{OrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created."
  25. stepKey="seeSuccessMessage"/>
  26. <click selector="{{KpOrderDetailsOrderViewSection.invoices}}" stepKey="clickInvoices"/>
  27. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask6"/>
  28. <wait stepKey="waitOrderPageLoad1" time="5"/>
  29. <!--View the new Invoice in order detail page -->
  30. <see selector="{{OrderDetailsInvoicesSection.content}}" userInput="{$kpGrabOrderNumber}" stepKey="seeInvoice1"/>
  31. <see selector="{{OrderDetailsInvoicesSection.content}}" userInput="John Doe" stepKey="seeInvoice2"/>
  32. <click selector="{{OrderDetailsOrderViewSection.information}}" stepKey="clickInformation"/>
  33. <see selector="{{OrderDetailsInformationSection.orderStatus}}" userInput="Processing" stepKey="seeOrderStatus"/>
  34. </actionGroup>
  35. </actionGroups>