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