AddToCartActionGroup.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132
  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="KpAddToCart">
  15. <amOnPage url="{{KpStorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/>
  16. <waitForPageLoad stepKey="waitForPageLoad1"/>
  17. <wait stepKey="productWait1" time="5"/>
  18. <moveMouseOver selector="{{KpStorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>
  19. <wait stepKey="productWait2" time="2"/>
  20. <click selector="{{KpStorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/>
  21. <waitForElementVisible selector="{{KpStorefrontCategoryMainSection.SuccessMsg}}" time="30"
  22. stepKey="waitForProductAdded"/>
  23. <see selector="{{KpStorefrontCategoryMainSection.SuccessMsg}}"
  24. userInput="You added $$createProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/>
  25. <wait stepKey="productWait3" time="5"/>
  26. <see selector="{{KpStorefrontMiniCartSection.quantity}}" userInput="$purchaseQty" stepKey="seeCartQuantity"/>
  27. <wait stepKey="productWait4" time="5"/>
  28. <click selector="{{KpStorefrontMiniCartSection.show}}" stepKey="clickCart"/>
  29. <wait stepKey="productWait5" time="5"/>
  30. </actionGroup>
  31. </actionGroups>