MakePaymentWithPayOverTimeActionGroup.xml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
  14. <actionGroup name="MakePaymentWithPayOverTime">
  15. <wait stepKey="paymentWait1" time="15"/>
  16. <!-- Place Order with Klarna Pay Later -->
  17. <click selector="{{KpGuestCheckoutShippingSection.firstShippingMethod}}" stepKey="kpSelectFirstShippingMethod"/>
  18. <wait stepKey="paymentWait2" time="15"/>
  19. <waitForElement selector="{{KpGuestCheckoutShippingSection.next}}" time="30" stepKey="kpWaitForNextButton"/>
  20. <click selector="{{KpGuestCheckoutShippingSection.next}}" stepKey="kpClickNext"/>
  21. <wait stepKey="paymentWait3" time="15"/>
  22. <!-- Select a Klarna Payment method -->
  23. <waitForElement selector="#klarna_pay_over_time" time="30" stepKey="kpWaitForPayOverTime"/>
  24. <click selector="#klarna_pay_over_time" stepKey="kpSelectPaymentMethod"/>
  25. <wait stepKey="paymentWait4" time="5"/>
  26. <waitForElement selector="{{KpGuestCheckoutPaymentSection.placeOrder}}" time="30"
  27. stepKey="kpWaitForPlaceOrderButton"/>
  28. <!-- Add any additional steps here, eg select terms, etc... -->
  29. <conditionalClick selector="{{KpGuestCheckoutPaymentSection.cartItemsArea}}"
  30. dependentSelector="{{KpGuestCheckoutPaymentSection.cartItemsAreaActive}}" visible="false"
  31. stepKey="kpExposeMiniCart"/>
  32. <see selector="{{KpGuestCheckoutPaymentSection.cartItems}}" userInput="{{_defaultProduct.name}}"
  33. stepKey="kpSeeProductInCart"/>
  34. <click selector=".payment-method._active button.action.primary.checkout" stepKey="kpClickPlaceOrder"/>
  35. <wait stepKey="paymentWait5" time="15"/>
  36. </actionGroup>
  37. </actionGroups>