ConfigureKlarnaNAActionGroup.xml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * This file is part of the Klarna KP module
  5. *
  6. * (c) Klarna Bank AB (publ)
  7. *
  8. * For the full copyright and license information, please view the NOTICE
  9. * and LICENSE files that were distributed with this source code.
  10. */
  11. -->
  12. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13. xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
  14. <actionGroup name="ConfigureKlarnaNA">
  15. <!-- GoTo Config klarna Payment fields -->
  16. <click stepKey="clickOnSTORES" selector="{{KpAdminMenuSection.stores}}"/>
  17. <waitForPageLoad stepKey="waitForConfiguration" time="2"/>
  18. <click stepKey="clickOnConfigurations" selector="{{KpStoresSubmenuSection.configuration}}" />
  19. <waitForPageLoad stepKey="waitForSales" time="2"/>
  20. <click stepKey="clickOnSales" selector="{{KpConfigurationListSection.sales}}" />
  21. <waitForPageLoad stepKey="waitForPaymentMethods" time="2"/>
  22. <click stepKey="clickOnPaymentMethods" selector="{{KpConfigurationListSection.salesPaymentMethods}}" />
  23. <waitForPageLoad stepKey="waitForConfigureButton" time="2"/>
  24. <click stepKey="clickOnConfigureButtonForKlarnaPayment" selector="{{KpConfigurationPaymentSection.configureButton}}" />
  25. <waitForPageLoad stepKey="KlarnaPaymentSettings" time="2"/>
  26. <!-- Fill Klarna Payment Api Setting Tab -->
  27. <click stepKey="clickOnConfigureTabForKlarnaPaymentApi" selector="{{KpConfiguraionSection.apiTab}}" />
  28. <waitForPageLoad stepKey="KlarnaPaymentApiSettings" time="2"/>
  29. <click stepKey="openApiVersionSelect" selector="{{KpConfiguraionSection.apiVersionSelect}}"/>
  30. <click stepKey="chooseEuApi" selector="{{KpConfiguraionSection.kpApiNa}}"/>
  31. <fillField stepKey="fillMerchantEid" selector="{{KpConfiguraionSection.merchantEid}}" userInput="{{_CREDS.klarna_us_merchant_id}}"/>
  32. <fillField stepKey="fillMerchantPwd" selector="{{KpConfiguraionSection.merchantPwd}}" userInput="{{_CREDS.klarna_us_shared_secret}}"/>
  33. <click stepKey="openApiTestMode" selector="{{KpConfiguraionSection.apiTestModeSelect}}"/>
  34. <click stepKey="chooseTestModeEnabled" selector="{{KpConfiguraionSection.testModeEnable}}"/>
  35. <click stepKey="openApiDebugMode" selector="{{KpConfiguraionSection.apiDebugModeSelect}}"/>
  36. <click stepKey="chooseDebugModeEnabled" selector="{{KpConfiguraionSection.debugModeEnable}}"/>
  37. <!-- Fill Klarna Payment Setting Tab -->
  38. <click stepKey="openKpPaymentActiveSelect" selector="{{KpConfiguraionSection.kpPaymentActiveSelect}}"/>
  39. <click stepKey="chooseKpPaymentActive" selector="{{KpConfiguraionSection.activeEnabled}}"/>
  40. <click stepKey="openKpPaymentAppliedCountriesSelect" selector="{{KpConfiguraionSection.kpPaymentAllowedCountriesSelect}}"/>
  41. <click stepKey="chooseAllAllowedCountries" selector="{{KpConfiguraionSection.allAllowedCountries}}"/>
  42. <!-- Save Configuration -->
  43. <click stepKey="save" selector="{{KpConfiguraionSection.save}}"/>
  44. <waitForElementVisible selector="{{KpConfiguraionSection.successfulMessage}}" stepKey="waitForSuccessfullyConfigured" time="10"/>
  45. </actionGroup>
  46. </actionGroups>