|
| 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 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminOnePayPalSolutionsEnabledAtTheSameTimeTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Paypal"/> |
| 14 | + <stories value="Payment methods configuration"/> |
| 15 | + <title value="Only one PayPal solution enabled at the same time"/> |
| 16 | + <description value="Verify that only one PayPal solution can be enabled"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-17776"/> |
| 19 | + <useCaseId value=" MC-15140"/> |
| 20 | + <group value="paypal"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 24 | + <!--Set PayPal Payments Standard Configs--> |
| 25 | + <comment userInput="Set PayPal Payments Standard Configs" stepKey="commentsetConfigs"/> |
| 26 | + <magentoCLI command="config:set paypal/wpp/api_authentication 0" stepKey="setApiAuthentication"/> |
| 27 | + <magentoCLI command="config:set paypal/wpp/api_username username" stepKey="setApiUserName"/> |
| 28 | + <magentoCLI command="config:set paypal/wpp/api_password password" stepKey="setApiPassword"/> |
| 29 | + <magentoCLI command="config:set paypal/wpp/api_signature signature" stepKey="setApiSignature"/> |
| 30 | + <magentoCLI command="config:set paypal/wpp/sandbox_flag 1" stepKey="setSandBox"/> |
| 31 | + <magentoCLI command="config:set paypal/wpp/use_proxy 0" stepKey="setUseProxy"/> |
| 32 | + <magentoCLI command="config:set payment/wps_express/active 1" stepKey="enableWPSExpress"/> |
| 33 | + </before> |
| 34 | + <after> |
| 35 | + <actionGroup ref="logout" stepKey="logout"/> |
| 36 | + <magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/> |
| 37 | + <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disableExpressCheckout"/> |
| 38 | + </after> |
| 39 | + <!--Try to enable express checkout Solution--> |
| 40 | + <comment userInput="Try to enable express checkout Solution" stepKey="commentTryEnableExpressCheckout"/> |
| 41 | + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> |
| 42 | + <actionGroup ref="EnablePayPalSolutionWithoutSave" stepKey="enableExpressCheckout"> |
| 43 | + <argument name="payPalConfigType" value="WPSExpressConfigSection"/> |
| 44 | + <argument name="countryCode" value="us"/> |
| 45 | + </actionGroup> |
| 46 | + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> |
| 47 | + <waitForPageLoad stepKey="waitForPageLoad2"/> |
| 48 | + <actionGroup ref="EnablePayPalSolutionWithoutSave" stepKey="enableExpressCheckout2"> |
| 49 | + <argument name="payPalConfigType" value="PayPalExpressCheckoutConfigSection"/> |
| 50 | + <argument name="countryCode" value="us"/> |
| 51 | + </actionGroup> |
| 52 | + <seeInPopup userInput="There is already another PayPal solution enabled. Enable this solution instead?" stepKey="seeAlertMessage"/> |
| 53 | + <cancelPopup stepKey="cancelPopup"/> |
| 54 | + <!--Check only the correct solution is enabled --> |
| 55 | + <comment userInput="Check only the correct solution is enabled" stepKey="commentCheckOnlyTheCorrectSolutionIsEnabled"/> |
| 56 | + <conditionalClick selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" dependentSelector="{{PayPalExpressCheckoutConfigSection.enableSolution('us')}}" visible="false" stepKey="clickPayPalExpressCheckoutSection"/> |
| 57 | + <seeOptionIsSelected selector="{{PayPalExpressCheckoutConfigSection.enableSolution('us')}}" userInput="No" stepKey="seeSelectedOption"/> |
| 58 | + </test> |
| 59 | +</tests> |
0 commit comments