You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 regels
1.9 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  10. <actionGroup name="ApplyCartRuleOnStorefrontActionGroup">
  11. <annotations>
  12. <description>Clicks on Add to Cart on a Storefront Product page. Validates that the Success Message is present and correct. Goes to the Storefront Shopping Cart page. Applies the provided Coupon Code to the Shopping Cart.</description>
  13. </annotations>
  14. <arguments>
  15. <argument name="product"/>
  16. <argument name="couponCode" type="string"/>
  17. </arguments>
  18. <waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartDisabled}}" stepKey="waitForAddToCartButtonToRemoveDisabledState"/>
  19. <waitForElementClickable selector="{{StorefrontProductActionSection.addToCart}}" stepKey="waitForAddToCartButton"/>
  20. <click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/>
  21. <waitForPageLoad stepKey="waitForAddToCart"/>
  22. <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
  23. <waitForText userInput="You added {{product.name}} to your shopping cart." stepKey="waitForText"/>
  24. <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCheckoutPage"/>
  25. <waitForPageLoad stepKey="waitForPageLoad1"/>
  26. <click selector="{{DiscountSection.DiscountTab}}" stepKey="clickToDiscountTab"/>
  27. <fillField selector="{{DiscountSection.CouponInput}}" userInput="{{couponCode}}" stepKey="fillCouponCode"/>
  28. <click selector="{{DiscountSection.ApplyCodeBtn}}" stepKey="applyCode"/>
  29. <waitForPageLoad stepKey="waitForPageLoad2"/>
  30. </actionGroup>
  31. </actionGroups>