KpAddCouponActionGroup.xml 1.3 KB

123456789101112131415161718192021222324252627
  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="KpAddCoupon">
  15. <amOnPage stepKey="onCartPage" url="/checkout/cart/"/>
  16. <waitForPageLoad stepKey="waitForPageLoad2"/>
  17. <click selector="{{KpStorefrontCartSection.ShowCouponCodeBox}}" stepKey="clickShowCouponCode"/>
  18. <wait stepKey="openCouponFieldWait" time="5"/>
  19. <fillField selector="{{KpStorefrontCartSection.CouponCodeField}}" userInput="$$kpCreateSalesCoupon.code$$" stepKey="kpEnterCouponCode"/>
  20. <wait stepKey="openCouponFieldWait" time="5"/>
  21. <click selector="{{KpStorefrontCartSection.CouponCodeApply}}" stepKey="clickApplyButton"/>
  22. <wait stepKey="applyCouponFieldWait" time="10"/>
  23. <see selector="{{KpStorefrontCartSection.SuccessMsg}}"
  24. userInput="You used coupon code &quot;$$kpCreateSalesCoupon.code$$&quot;." stepKey="seeAddedCouponToCartMessage"/>
  25. </actionGroup>
  26. </actionGroups>