ConfigureBraintreeActionGroup.xml 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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="ConfigureBraintree">
  11. <!-- GoTo ConfigureBraintree fields -->
  12. <click stepKey="clickOnSTORES" selector="{{AdminMenuSection.stores}}"/>
  13. <waitForPageLoad stepKey="waitForConfiguration" time="2"/>
  14. <click stepKey="clickOnConfigurations" selector="{{AdminMenuSection.configuration}}" />
  15. <waitForPageLoad stepKey="waitForSales" time="2"/>
  16. <click stepKey="clickOnSales" selector="{{ConfigurationListSection.sales}}" />
  17. <waitForPageLoad stepKey="waitForPaymentMethods" time="2"/>
  18. <click stepKey="clickOnPaymentMethods" selector="{{ConfigurationListSection.salesPaymentMethods}}" />
  19. <waitForPageLoad stepKey="waitForConfigureButton" time="2"/>
  20. <click stepKey="clickOnConfigureButtonForBraintree" selector="{{ConfigurationPaymentSection.configureButton}}" />
  21. <waitForPageLoad stepKey="BraintreeSettings" time="2"/>
  22. <!-- Fill Braintree fields -->
  23. <fillField stepKey="fillTitleForBraintreeSettings" selector="{{BraintreeConfiguraionSection.titleForBraintreeSettings}}" userInput="{{BraintreeConfigurationData.title}}"/>
  24. <click stepKey="openEnvironmentSelect" selector="{{BraintreeConfiguraionSection.environment}}"/>
  25. <click stepKey="chooseEnvironment" selector="{{BraintreeConfiguraionSection.sandbox}}"/>
  26. <click stepKey="openPaymentActionSelect" selector="{{BraintreeConfiguraionSection.paymentActionSelect}}"/>
  27. <click stepKey="choosePaymentAction" selector="{{BraintreeConfiguraionSection.paymentAction}}"/>
  28. <fillField stepKey="fillMerchantID" selector="{{BraintreeConfiguraionSection.merchantID}}" userInput="{{BraintreeConfigurationData.merchantID}}"/>
  29. <fillField stepKey="fillPublicKey" selector="{{BraintreeConfiguraionSection.publicKey}}" userInput="{{BraintreeConfigurationData.publicKey}}"/>
  30. <fillField stepKey="fillPrivateKey" selector="{{BraintreeConfiguraionSection.privateKey}}" userInput="{{BraintreeConfigurationData.privateKey}}"/>
  31. <click stepKey="expandEnableThisSolution" selector="{{BraintreeConfiguraionSection.enableThisSolution}}"/>
  32. <click stepKey="chooseYesForEnableThisSolution" selector="{{BraintreeConfiguraionSection.yesForEnable}}"/>
  33. <click stepKey="expandEnablePayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.payPalThroughBraintree}}"/>
  34. <click stepKey="chooseYesForEnablePayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.yesForPayPalThroughBraintree}}"/>
  35. <click stepKey="expandAdvancedBraintreeSettings" selector="{{BraintreeConfiguraionSection.advancedBraintreeSettings}}"/>
  36. <fillField stepKey="fillMerchantAccountID" selector="{{BraintreeConfiguraionSection.merchantAccountID}}" userInput="{{BraintreeConfigurationData.merchantAccountID}}"/>
  37. <click stepKey="expandCVVVerification" selector="{{BraintreeConfiguraionSection.CVVVerification}}"/>
  38. <click stepKey="chooseYes" selector="{{BraintreeConfiguraionSection.yesForCVV}}"/>
  39. <click stepKey="expandPayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.payPalThroughBraintreeSelector}}"/>
  40. <fillField stepKey="fillTitleForPayPalThroughBraintree" selector="{{BraintreeConfiguraionSection.titleForPayPalThroughBraintree}}" userInput="{{BraintreeConfigurationData.titleForPayPalThroughBraintree}}"/>
  41. <click stepKey="expandPaymentAction" selector="{{BraintreeConfiguraionSection.paymentActionInPayPal}}"/>
  42. <click stepKey="chooseAuthorize" selector="{{BraintreeConfiguraionSection.actionAuthorize}}"/>
  43. <click stepKey="save" selector="{{BraintreeConfiguraionSection.save}}"/>
  44. <waitForElementVisible selector="{{BraintreeConfiguraionSection.successfulMessage}}" stepKey="waitForSuccessfullyConfigured" time="10"/>
  45. </actionGroup>
  46. <actionGroup name="DisableBrainTree">
  47. <magentoCLI stepKey="disableBrainTree" command="config:set payment/braintree/active 0"/>
  48. <magentoCLI stepKey="disableBrainTreePaypal" command="config:set payment/braintree_paypal/active 0"/>
  49. </actionGroup>
  50. </actionGroups>