TemandoCheckoutActionGroup.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  4. <!-- Add simple product to cart -->
  5. <actionGroup name="TemandoAddSimpleProductToCart">
  6. <amOnPage url="{{StorefrontCategoryPage.url($$simplecategory.name$$)}}" stepKey="onCategoryPage" />
  7. <waitForPageLoad stepKey="waitForCategoryPage" />
  8. <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct" />
  9. <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart" />
  10. <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded" />
  11. <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$simpleproduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage" />
  12. <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity" />
  13. </actionGroup>
  14. <!-- Enter shipping details at checkout -->
  15. <actionGroup name="TemandoCompleteShippingDetails">
  16. <fillField selector="{{CheckoutShippingSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="enterEmail"/>
  17. <fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="enterFirstName"/>
  18. <fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="enterLastName"/>
  19. <fillField selector="{{CheckoutShippingSection.street}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="enterStreet"/>
  20. <fillField selector="{{CheckoutShippingSection.city}}" userInput="{{CustomerAddressSimple.city}}" stepKey="enterCity"/>
  21. <selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{CustomerAddressSimple.state}}" stepKey="selectRegion"/>
  22. <fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="enterPostcode"/>
  23. <fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="enterTelephone"/>
  24. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
  25. </actionGroup>
  26. <!-- Select a shipping method at checkout -->
  27. <actionGroup name="TemandoSelectShippingMethod">
  28. <arguments>
  29. <argument name="shippingMethod" type="string" />
  30. </arguments>
  31. <scrollTo stepKey="scrollToShippingMethods" selector="{{TemandoCheckoutSection.ShippingMethodsTable}}" />
  32. <seeElement stepKey="seeStandardShipping" selector="{{TemandoCheckoutSection.ShippingMethodLabel(shippingMethod)}}" />
  33. <grabTextFrom selector="{{TemandoCheckoutSection.ShippingMethodLabel(shippingMethod)}}" stepKey="shippingLabel" />
  34. <click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('{$shippingLabel}')}}" stepKey="selectStandardShipping" />
  35. <waitForLoadingMaskToDisappear stepKey="waitForStandardShipping" />
  36. </actionGroup>
  37. </actionGroups>