Skip to content

Commit 5d299c6

Browse files
committed
Merge branch 'ACQE-6710' into ACQE-6897-functional-mainline-deployment
2 parents b0c05b4 + ed7c791 commit 5d299c6

5 files changed

+258
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertPaymentGatewaySolutionActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Validate Payment Solutions available in Payment Gateways Solution</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countryCode" type="string" defaultValue="us"/>
17+
</arguments>
18+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
19+
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
20+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab1(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="clickOtherPayPalPaymentsSection"/>
21+
<conditionalClick selector ="{{OtherPayPalPaymentsConfigSection.expandTabNew(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTabNew(countryCode)}}" visible="false" stepKey="expandPaypalPaymentGatewaysConfigButton"/>
22+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.paypalAllInOnePaymentSolutions(countryCode)}}" stepKey="assertPayinAllLink"/>
23+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.paymentGateway(countryCode)}}" stepKey="assertPaypalPaymentGateway"/>
24+
<scrollTo selector="{{AdminPayPalPayFlowLinkConfigSection.paymentGateway(countryCode)}}" stepKey="scrollToConfigure"/>
25+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" stepKey="assertPayflowLink"/>
26+
<waitForElementVisible selector="{{PayPalPayflowProConfigSection.configureBtn(countryCode)}}" stepKey="assertPayflowPro"/>
27+
</actionGroup>
28+
</actionGroups>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertPaymentSolutionForPayflowLinkActionGroup" extends="AdminEnablePayPalPayFlowLinkActionGroup">
12+
<annotations>
13+
<description>Configuration for Payflow link with Sample PayPal credentials and Assert Paypal Credit and Express Checkout</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countryCode" type="string" defaultValue="us"/>
17+
</arguments>
18+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enableSolution(countryCode)}}" userInput="No" stepKey="seeEnableThisSolutionIsSetAsNo" after="enableTestMode"/>
19+
<assertElementContainsAttribute stepKey="seeEnablePaypalCreditIsDisabled" after="seeEnableThisSolutionIsSetAsNo">
20+
<expectedResult selector="{{AdminPayPalPayFlowLinkConfigSection.enablePaypalCredit(countryCode)}}" attribute="disabled" type="string"></expectedResult>
21+
</assertElementContainsAttribute>
22+
<assertElementContainsAttribute stepKey="seeEnableExpressCheckoutIsDisabled" after="seeEnableThisSolutionIsSetAsNo">
23+
<expectedResult selector="{{AdminPayPalPayFlowLinkConfigSection.enableExpressCheckout(countryCode)}}" attribute="disabled" type="string"></expectedResult>
24+
</assertElementContainsAttribute>
25+
<!-- Check that Paypal Credit and Express Checkoutis set to No and it is disabled -->
26+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enablePaypalCredit(countryCode)}}" userInput="No" stepKey="seePaypalCreditIsSetAsNo" after="seeEnablePaypalCreditIsDisabled"/>
27+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enableExpressCheckout(countryCode)}}" userInput="No" stepKey="seeExpressCheckoutIsSetAsNo" after="seeEnableExpressCheckoutIsDisabled"/>
28+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.disabledEnableSolution(countryCode)}}" stepKey="assertGreenTickMarkPresentForEnableThisSolutionDropdown" after="enableSolution"/>
29+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enablePaypalCredit(countryCode)}}" userInput="Yes" stepKey="seePaypalCreditIsSetAsYes" before="waitForSaveConfigToBeVisible"/>
30+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.disabledPaypalCredit(countryCode)}}" stepKey="assertGreenTickMarkPresentForEnablePaypalCredit" after="assertGreenTickMarkPresentForEnableThisSolutionDropdown"/>
31+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.sortOrder(countryCode)}}" stepKey="assertSortOrder" after="assertGreenTickMarkPresentForEnablePaypalCredit"/>
32+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.disabledExpressCheckout(countryCode)}}" stepKey="assertGreenTickMarkPresentForEnablePaypalCheckout" before="waitForSaveConfigToBeVisible"/>
33+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enableExpressCheckout(countryCode)}}" userInput="Yes" stepKey="seeExpressCheckoutIsSetAsYes" before="waitForSaveConfigToBeVisible"/>
34+
</actionGroup>
35+
</actionGroups>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="AdminClearPayflowLinkExistingDataActionGroup">
10+
<annotations>
11+
<description>Admin goes to payflow link configuration and clears provided Sample PayPal credentials</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="countryCode" type="string" defaultValue="us"/>
15+
</arguments>
16+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
17+
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
18+
<waitForElementVisible selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForOtherPayPalPaymentsSection"/>
19+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="clickOtherPayPalPaymentsSection"/>
20+
<conditionalClick selector ="{{AdminPayPalPayFlowLinkConfigSection.paymentGateway(countryCode)}}" dependentSelector="{{AdminPayPalPayFlowLinkConfigSection.paymentGateway(countryCode)}}" visible="false" stepKey="clickPayPalPayflowPaymentGatewayBtn"/>
21+
<waitForElementClickable selector="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalPayflowLinkConfigureBtn"/>
22+
<click selector ="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPayflowLinkoConfigureBtn"/>
23+
<waitForPageLoad stepKey="waitForPaymethodConfigPageLoad"/>
24+
<clearField selector="{{AdminPayPalPayFlowLinkConfigSection.partner(countryCode)}}" stepKey="clearInputPartnerField"/>
25+
<clearField selector="{{AdminPayPalPayFlowLinkConfigSection.vendor(countryCode)}}" stepKey="clearInputVendorField"/>
26+
<clearField selector="{{AdminPayPalPayFlowLinkConfigSection.user(countryCode)}}" stepKey="clearInputUsereField"/>
27+
<clearField selector="{{AdminPayPalPayFlowLinkConfigSection.password(countryCode)}}" stepKey="clearInputPasswordField"/>
28+
<selectOption selector="{{AdminPayPalPayFlowLinkConfigSection.testMode(countryCode)}}" userInput="No" stepKey="disableTestMode"/>
29+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enableSolution(countryCode)}}" userInput="No" stepKey="seeEnableThisSolutionIsSetNo" after="disableTestMode"/>
30+
<assertElementContainsAttribute stepKey="seeEnableThisSolutionIsDisabled">
31+
<expectedResult selector="{{AdminPayPalPayFlowLinkConfigSection.enableSolution(countryCode)}}" attribute="disabled" type="string"></expectedResult>
32+
</assertElementContainsAttribute>
33+
<assertElementContainsAttribute stepKey="seeEnablePaypalCreditIsDisabled">
34+
<expectedResult selector="{{AdminPayPalPayFlowLinkConfigSection.enablePaypalCredit(countryCode)}}" attribute="disabled" type="string"></expectedResult>
35+
</assertElementContainsAttribute>
36+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enablePaypalCredit(countryCode)}}" userInput="No" stepKey="seePaypalCreditIsSetNo"/>
37+
<assertElementContainsAttribute stepKey="seeEnableExpressCheckoutIsDisabled">
38+
<expectedResult selector="{{AdminPayPalPayFlowLinkConfigSection.enableExpressCheckout(countryCode)}}" attribute="disabled" type="string"></expectedResult>
39+
</assertElementContainsAttribute>
40+
<seeOptionIsSelected selector="{{AdminPayPalPayFlowLinkConfigSection.enableExpressCheckout(countryCode)}}" userInput="No" stepKey="seeExpressCheckoutIsSetNo"/>
41+
</actionGroup>
42+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Section/AdminPayPalPayFlowLinkConfigSection.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
<element name="password" type="text" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_link_pwd" parameterized="true"/>
1616
<element name="testMode" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_link_sandbox_flag" parameterized="true"/>
1717
<element name="enableSolution" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_payflow_link" parameterized="true"/>
18-
<element name="paymentGateway" type="button" selector="//a[@id='payment_{{countryCode}}_paypal_payment_gateways-head'] " parameterized="true"/>
18+
<element name="paymentGateway" type="button" selector="//*[@id='payment_{{countryCode}}_paypal_payment_gateways-head'] " parameterized="true"/>
19+
<element name="paypalAllInOnePaymentSolutions" type="input" selector="//*[contains(@id, 'payment_{{countryCode}}_paypal_group_all_in_one-head')]" parameterized="true" />
20+
<element name="enablePaypalCredit" type="select" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_express_checkout_bml" parameterized="true"/>
21+
<element name="enableExpressCheckout" type="select" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_express_checkout" parameterized="true"/>
22+
<element name="disabledEnableSolution" type="select" selector="//*[contains(@id,'payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_payflow_link')]//label[@class='enabled']" parameterized="true"/>
23+
<element name="disabledPaypalCredit" type="select" selector="//*[contains(@id,'payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_express_checkout_bml')]//label[@class='enabled']" parameterized="true"/>
24+
<element name="disabledExpressCheckout" type="select" selector="//*[contains(@id,'payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_express_checkout')]//label[@class='enabled']" parameterized="true"/>
25+
<element name="sortOrder" type="input" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_express_checkout_bml_sort_order" parameterized="true"/>
26+
<element name="closeButton" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us-head span[class='state-opened']" parameterized="true"/>
1927
</section>
2028
</sections>

0 commit comments

Comments
 (0)