| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- /**
- * This file is part of the Klarna KP module
- *
- * (c) Klarna Bank AB (publ)
- *
- * For the full copyright and license information, please view the NOTICE
- * and LICENSE files that were distributed with this source code.
- */
- -->
- <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
- <actionGroup name="KpAddToCart">
- <arguments>
- <argument name="purchaseQty" defaultValue="1" type="string"/>
- </arguments>
- <amOnPage url="{{KpStorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/>
- <waitForPageLoad stepKey="waitForPageLoad1"/>
- <wait stepKey="productWait1" time="5"/>
- <moveMouseOver selector="{{KpStorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/>
- <wait stepKey="productWait2" time="2"/>
- <click selector="{{KpStorefrontCategoryMainSection.ProductCategoryImage}}" stepKey="clickOnProduct"/>
- <wait stepKey="productWait3" time="2"/>
- <fillField selector="{{KpProductDetailSection.QtyField}}" userInput="{{purchaseQty}}" stepKey="kpEnterPurchaseQty"/>
- <click selector="{{KpProductDetailSection.AddToCartButton}}" stepKey="addToCart"/>
- <waitForElementVisible selector="{{KpStorefrontCategoryMainSection.SuccessMsg}}" time="30"
- stepKey="waitForProductAdded"/>
- <see selector="{{KpStorefrontCategoryMainSection.SuccessMsg}}"
- userInput="You added $$createProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/>
- <wait stepKey="productWait3" time="5"/>
- <see selector="{{KpStorefrontMiniCartSection.quantity}}" userInput="{{purchaseQty}}" stepKey="seeCartQuantity"/>
- <wait stepKey="productWait4" time="5"/>
- <click selector="{{KpStorefrontMiniCartSection.show}}" stepKey="clickCart"/>
- <wait stepKey="productWait5" time="5"/>
- <click selector="{{KpStorefrontMiniCartSection.goToCheckout}}" stepKey="goToCheckout"/>
- <waitForPageLoad stepKey="waitForPageLoad2"/>
- </actionGroup>
- </actionGroups>
|