FillPaymentInformationActionGroup.xml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  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="FillPaymentInformation">
  11. <click stepKey="clickOnAuthorizenetToggle" selector="{{AuthorizenetCheckoutSection.selectAuthorizenet}}"/>
  12. <waitForPageLoad stepKey="waitForCardDataSection"/>
  13. <fillField stepKey="fillCardNumber" selector="{{AuthorizenetCheckoutSection.cardInput}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
  14. <selectOption stepKey="fillExpMonth" selector="{{AuthorizenetCheckoutSection.expMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
  15. <selectOption stepKey="fillExpYear" selector="{{AuthorizenetCheckoutSection.expYear}}" userInput="20{{PaymentAndShippingInfo.year}}"/>
  16. <fillField stepKey="fillCvv" selector="{{AuthorizenetCheckoutSection.cvv}}" userInput="123"/>
  17. <click stepKey="checkoutButton" selector="{{AuthorizenetCheckoutSection.checkoutButton}}"/>
  18. <waitForPageLoad stepKey="waitForCheckout"/>
  19. </actionGroup>
  20. <!-- Guest checkout Authorizenet fill billing address -->
  21. <actionGroup name="GuestCheckoutAuthorizenetFillBillingAddress">
  22. <arguments>
  23. <argument name="customer"/>
  24. <argument name="customerAddress"/>
  25. </arguments>
  26. <fillField selector="{{GuestAuthorizenetCheckoutSection.firstName}}" userInput="{{customer.firstName}}" stepKey="fillFirstName"/>
  27. <fillField selector="{{GuestAuthorizenetCheckoutSection.lastName}}" userInput="{{customer.lastName}}" stepKey="fillLastName"/>
  28. <fillField selector="{{GuestAuthorizenetCheckoutSection.street}}" userInput="{{customerAddress.street[0]}}" stepKey="fillStreet"/>
  29. <fillField selector="{{GuestAuthorizenetCheckoutSection.city}}" userInput="{{customerAddress.city}}" stepKey="fillCity"/>
  30. <selectOption selector="{{GuestAuthorizenetCheckoutSection.state}}" userInput="{{customerAddress.state}}" stepKey="selectState"/>
  31. <fillField selector="{{GuestAuthorizenetCheckoutSection.postcode}}" userInput="{{customerAddress.postcode}}" stepKey="fillPostCode"/>
  32. <fillField selector="{{GuestAuthorizenetCheckoutSection.telephone}}" userInput="{{customerAddress.telephone}}" stepKey="fillTelephone"/>
  33. <click selector="{{GuestAuthorizenetCheckoutSection.update}}" stepKey="updateAddress"/>
  34. <waitForPageLoad stepKey="waitForUpdate"/>
  35. </actionGroup>
  36. </actionGroups>