Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

45 righe
2.6 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="CreatePayPalOrderWithSelectedPaymentMethodActionGroup" extends="CreateOrderToPrintPageActionGroup">
  11. <annotations>
  12. <description>EXTENDS: CreateOrderToPrintPageActionGroup. Clicks on PayPal. Fills the PayPay details in the modal. PLEASE NOTE: The PayPal Payment credentials are Hardcoded using 'Payer'.</description>
  13. </annotations>
  14. <arguments>
  15. <argument name="payerName" defaultValue="MPI" type="string"/>
  16. <argument name="credentials" defaultValue="_CREDS"/>
  17. </arguments>
  18. <!-- click on PayPal payment radio button -->
  19. <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPlaceOrderButton"/>
  20. <click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="clickPlaceOrder"/>
  21. <!--set ID for iframe of PayPal group button-->
  22. <executeJS function="jQuery('.zoid-component-frame.zoid-visible').attr('id', 'myIframe')" stepKey="clickOrderLink"/>
  23. <!--switch to iframe of PayPal group button-->
  24. <switchToIFrame userInput="myIframe" stepKey="clickPrintOrderLink"/>
  25. <waitForElementVisible selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="waitForPayPalBtn"/>
  26. <click selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="clickPayPalBtn"/>
  27. <switchToIFrame stepKey="switchBack1"/>
  28. <!--Check in-context-->
  29. <switchToNextTab stepKey="switchToInContentTab"/>
  30. <waitForPageLoad stepKey="waitForPageLoad"/>
  31. <seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
  32. <waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
  33. <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/>
  34. <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/>
  35. <click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
  36. <waitForPageLoad stepKey="wait"/>
  37. <see userInput="{{payerName}}" selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/>
  38. </actionGroup>
  39. </actionGroups>