Skip to content

Commit 007f481

Browse files
committed
Merge branch 'ACQE-6571' into ACQE-7157-functional-tests-mainline-deployment
2 parents bba1b74 + 32f3dc0 commit 007f481

7 files changed

+262
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AdminAssertOtherPaypalPaymentSolutionActionGroup">
12+
<annotations>
13+
<description>Admin navigate to payment configuration page and assert Other Paypal Payment 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="{{PayPalPaymentsProConfigSection.paypalAllInOnePaymentSolutions(countryCode)}}" dependentSelector="{{PayPalPaymentsProConfigSection.paypalAllInOnePaymentSolutions(countryCode)}}" visible="false" stepKey="clickPayPalPaymentsSection"/>
22+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.paypalAllInOnePaymentSolutions(countryCode)}}" stepKey="assertPayinAllLink"/>
23+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.paymentGateway(countryCode)}}" stepKey="assertPaypalPaymentGateway"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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="AdminAssertPaypalCreditPaymentsProActionGroup" extends="AdminConfigurePayPalPaymentsProActionGroup">
12+
<annotations>
13+
<description>Configuration for Payments pro with Sample PayPal credentials and Assert Other Paypal Solution</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countryCode" type="string" defaultValue="us"/>
17+
</arguments>
18+
<remove keyForRemoval="expandOtherPaypalConfigButton"/>
19+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="clickOtherPayPalPaymentsSection" before="waitForPayPalPaymentsProConfigureBtn"/>
20+
<seeOptionIsSelected selector="{{PayPalPaymentsProConfigSection.enableSolution(countryCode)}}" userInput="No" stepKey="seeEnableThisSolutionIsSetAsNo" after="enableTestMode"/>
21+
<assertElementContainsAttribute stepKey="seeEnablePaypalCreditIsDisabled" after="seeEnableThisSolutionIsSetAsNo">
22+
<expectedResult selector="{{PayPalPaymentsProConfigSection.enablePaypalCredit(countryCode)}}" attribute="disabled" type="string"></expectedResult>
23+
</assertElementContainsAttribute>
24+
<assertElementContainsAttribute stepKey="seeEnableVaultIsDisabled" after="scrollToBottom">
25+
<expectedResult selector="{{PayPalPaymentsProConfigSection.enableVault(countryCode)}}" attribute="disabled" type="string"></expectedResult>
26+
</assertElementContainsAttribute>
27+
<!-- Check that Paypal Credit and Vault is set to No and it is disabled -->
28+
<seeOptionIsSelected selector="{{PayPalPaymentsProConfigSection.enablePaypalCredit(countryCode)}}" userInput="No" stepKey="seePaypalCreditIsSetAsNo" after="seeEnablePaypalCreditIsDisabled"/>
29+
<seeOptionIsSelected selector="{{PayPalPaymentsProConfigSection.enableVault(countryCode)}}" userInput="No" stepKey="seeValultIsSetAsNo" after="seeEnableVaultIsDisabled"/>
30+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.disabledEnableSolution(countryCode)}}" stepKey="assertGreenTickMarkForEnableThisSolutionDropdown" after="enableSolution"/>
31+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.disabledPaypalCredit(countryCode)}}" stepKey="assertGreenTickMarkForEnablePaypalCredit" after="assertGreenTickMarkForEnableThisSolutionDropdown"/>
32+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.sortOrder(countryCode)}}" stepKey="assertSortOrder" after="assertGreenTickMarkForEnablePaypalCredit"/>
33+
<selectOption selector="{{PayPalPaymentsProConfigSection.enableVault(countryCode)}}" userInput="Yes" stepKey="setValultIsSetAsYes" before="waitForSaveButtonBecomeClickable"/>
34+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.disabledVault(countryCode)}}" stepKey="assertGreenTickMarkForEnableVaultDropdown" after="setValultIsSetAsYes"/>
35+
</actionGroup>
36+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminAssetForPayallInOneActionGroup" extends="AdminAssertOtherPaypalPaymentSolutionActionGroup">
12+
<annotations>
13+
<description>Admin navigate to payment configuration page and assert Pay All In One Link and Other Payment Services</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countryCode" type="string" defaultValue="us"/>
17+
</arguments>
18+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.paymentsAdvanced(countryCode)}}" stepKey="assertPaymentAdvanced" after="assertPayinAllLink"/>
19+
<waitForElementVisible selector="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="assertPaymentsPro" after="assertPaymentAdvanced"/>
20+
<waitForElementVisible selector="{{AdminPaypalStandardConfigSection.configureBtn(countryCode)}}" stepKey="assertPaymentStandard" after="assertPaymentsPro"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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="AdminClearPaymentsProActionGroup">
12+
<annotations>
13+
<description>Admin goes to payments pro configuration and clears provided Sample PayPal credentials</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+
<waitForElementVisible selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForOtherPayPalPaymentsSection"/>
21+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="clickOtherPayPalPaymentsSection"/>
22+
<waitForElementClickable selector="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalPaymentsProConfigureBtn"/>
23+
<click selector ="{{PayPalPaymentsProConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalPaymentsProConfigureBtn"/>
24+
<waitForPageLoad stepKey="waitForPaymethodConfigPageLoad"/>
25+
<clearField selector="{{PayPalPaymentsProConfigSection.partner(countryCode)}}" stepKey="clearInputPartnerField"/>
26+
<clearField selector="{{PayPalPaymentsProConfigSection.vendor(countryCode)}}" stepKey="clearInputVendorField"/>
27+
<clearField selector="{{PayPalPaymentsProConfigSection.user(countryCode)}}" stepKey="clearInputUsereField"/>
28+
<clearField selector="{{PayPalPaymentsProConfigSection.password(countryCode)}}" stepKey="clearInputPasswordField"/>
29+
<selectOption selector="{{PayPalPaymentsProConfigSection.testMode(countryCode)}}" userInput="No" stepKey="disableTestMode"/>
30+
<assertElementContainsAttribute stepKey="seeEnablePaymentsProSolutionIsDisabled">
31+
<expectedResult selector="{{PayPalPaymentsProConfigSection.enableSolution(countryCode)}}" attribute="disabled" type="string"></expectedResult>
32+
</assertElementContainsAttribute>
33+
<seeOptionIsSelected selector="{{PayPalPaymentsProConfigSection.enableSolution(countryCode)}}" userInput="No" stepKey="seeEnableThisSolutionIsSetAsNo"/>
34+
<assertElementContainsAttribute stepKey="seeEnablePaypalCreditIsDisabled">
35+
<expectedResult selector="{{PayPalPaymentsProConfigSection.enablePaypalCredit(countryCode)}}" attribute="disabled" type="string"></expectedResult>
36+
</assertElementContainsAttribute>
37+
<seeOptionIsSelected selector="{{PayPalPaymentsProConfigSection.enablePaypalCredit(countryCode)}}" userInput="No" stepKey="seePaypalCreditIsSetAsNo" after="seeEnablePaypalCreditIsDisabled"/>
38+
<assertElementContainsAttribute stepKey="seeEnableVaultIsDisabled">
39+
<expectedResult selector="{{PayPalPaymentsProConfigSection.enableVault(countryCode)}}" attribute="disabled" type="string"></expectedResult>
40+
</assertElementContainsAttribute>
41+
<seeOptionIsSelected selector="{{PayPalPaymentsProConfigSection.enableVault(countryCode)}}" userInput="No" stepKey="seeValultIsSetAsNo" after="seeEnableVaultIsDisabled"/>
42+
</actionGroup>
43+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="SamplePaypalConfig" type="paypal_config_state">
1212
<requiredEntity type="business_account">SampleBusinessAccount</requiredEntity>
1313
<requiredEntity type="api_username">SampleApiUsername</requiredEntity>

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

100644100755
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,13 @@
1616
<element name="testMode" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_paypal_payflow_api_settings_sandbox_flag" parameterized="true"/>
1717
<element name="enableSolution" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_paypal_payflow" parameterized="true"/>
1818
<element name="paymentsAdvanced" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_payflow_advanced-head" parameterized="true"/>
19+
<element name="enablePaypalCredit" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_express_checkout_bml_payflow" parameterized="true"/>
20+
<element name="enableVault" type="select" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_payflowpro_cc_vault_active" parameterized="true"/>
21+
<element name="disabledEnableSolution" type="select" selector="//*[contains(@id,'payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_paypal_payflow')]//label[@class='enabled']" parameterized="true"/>
22+
<element name="disabledPaypalCredit" type="select" selector="//*[contains(@id,'payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_enable_express_checkout_bml_payflow')]//label[@class='enabled']" parameterized="true"/>
23+
<element name="disabledVault" type="select" selector="//*[contains(@id,'payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_payflowpro_cc_vault_active')]//label[@class='enabled']" parameterized="true"/>
24+
<element name="closeButton" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk-head span[class='state-opened']" parameterized="true"/>
25+
<element name="sortOrder" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wpp_usuk_paypal_payflow_required_express_checkout_bml_sort_order" parameterized="true"/>
26+
<element name="paypalAllInOnePaymentSolutions" type="input" selector="//*[contains(@id, 'payment_{{countryCode}}_paypal_group_all_in_one-head')]" parameterized="true" />
1927
</section>
2028
</sections>

0 commit comments

Comments
 (0)