PlaceOrderAsSigninWithPayOverTimeAndCouponTest.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
  14. <test name="PlaceOrderAsSigninWithPayOverTimeAndCouponTest">
  15. <annotations>
  16. <features value="Place order with Klarna Payment as logged in customer with coupon"/>
  17. <stories value="Place order with Klarna Payment as logged in customer with coupon"/>
  18. <title value="Pay overtime as logged in with coupon"/>
  19. <description value="You should be able to place an order with coupon as logged in customer using Pay Over Time."/>
  20. <severity value="AVERAGE"/>
  21. <group value="klarna"/>
  22. <group value="klarna_pay_over_time"/>
  23. <group value="payments"/>
  24. </annotations>
  25. <before>
  26. <createData entity="_defaultCategory" stepKey="createCategory"/>
  27. <createData entity="_defaultProduct" stepKey="createProduct">
  28. <requiredEntity createDataKey="createCategory"/>
  29. </createData>
  30. <createData entity="KpTestSalesRuleData" stepKey="kpCreateSalesRule"/>
  31. <createData entity="KpTestSalesCouponData" stepKey="kpCreateSalesCoupon">
  32. <requiredEntity createDataKey="kpCreateSalesRule"/>
  33. </createData>
  34. <createData entity="KpCustomerEntityOne" stepKey="createCustomer"/>
  35. </before>
  36. <after>
  37. <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
  38. <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
  39. <deleteData createDataKey="kpCreateSalesRule" stepKey="kpDeleteSalesRule"/>
  40. <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
  41. </after>
  42. <actionGroup ref="KpCustomerLogIn" stepKey="kpCustomerLogin"/>
  43. <actionGroup ref="KpAddToCart" stepKey="kpAddToCart">
  44. <argument name="purchaseQty" value="1"/>
  45. </actionGroup>
  46. <actionGroup ref="KpAddCoupon" stepKey="kpAddCoupon"/>
  47. <actionGroup ref="MakePaymentWithPayOverTime" stepKey="kpPlaceOrderWithPayOverTime"/>
  48. <!-- Add any additional steps here, eg enter DOB, SSN, etc... -->
  49. <grabTextFrom selector="{{KpCheckoutSuccessMainSection.orderNumber}}" stepKey="kpGrabOrderNumber"/>
  50. <see selector="{{KpCheckoutSuccessMainSection.success}}" userInput="Your order # is:" stepKey="kpSeeOrderNumber"/>
  51. <see selector="{{KpCheckoutSuccessMainSection.success}}" userInput="We'll email you an order confirmation with details and tracking info." stepKey="kpSeeEmailYou"/>
  52. </test>
  53. </tests>