Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

35 linhas
2.0 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="VerifyDiscountAmountActionGroup">
  11. <annotations>
  12. <description>Goes to the provided Storefront Product URL. Fills in provided Quantity. Clicks Add to Cart. Goes to Checkout. Validates that the provided Discount Amount is present and correct.</description>
  13. </annotations>
  14. <arguments>
  15. <argument name="productUrl" type="string"/>
  16. <argument name="quantity" type="string"/>
  17. <argument name="expectedDiscount" type="string"/>
  18. </arguments>
  19. <amOnPage url="{{productUrl}}" stepKey="goToProductPage"/>
  20. <waitForPageLoad stepKey="waitForProductPageLoad"/>
  21. <fillField selector="{{StorefrontProductActionSection.quantity}}" userInput="{{quantity}}" stepKey="fillQuantity"/>
  22. <waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartDisabled}}" stepKey="waitForAddToCartButtonToRemoveDisabledState"/>
  23. <waitForElementClickable selector="{{StorefrontProductActionSection.addToCart}}" stepKey="waitForAddToCartButton"/>
  24. <click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addProductToCart"/>
  25. <waitForPageLoad stepKey="waitForAddToCart"/>
  26. <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
  27. <amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCartPage"/>
  28. <waitForPageLoad stepKey="waitForCartPage"/>
  29. <waitForElementVisible selector="{{CheckoutCartSummarySection.discountAmount}}" stepKey="waitForDiscountElement"/>
  30. <waitForText selector="{{CheckoutCartSummarySection.discountAmount}}" userInput="{{expectedDiscount}}" stepKey="seeDiscountTotal"/>
  31. </actionGroup>
  32. </actionGroups>