<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="AdminPayPalRegionalLinkActionGroup">
        <annotations>
            <description>Expands the 'PAYPAL EXPRESS CHECKOUT PAYMENT SOLUTIONS' tab on the Admin Configuration page. Enables the provided PayPal Config type for the provided Country Code.</description>
        </annotations>
        <arguments>
            <argument name="payPalConfigType"/>
            <argument name="countryCode" type="string" defaultValue="us"/>
        </arguments>
        <click selector="{{payPalConfigType.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
        <waitForPageLoad stepKey="waitForPageLoad"/>
        <grabAttributeFrom userInput="href" selector="{{PayPalRegionalCommentSection.country(countryCode)}}" stepKey="grabCommentText"/>
        <assertStringContainsString stepKey="verifyCommentLink">
            <expectedResult type="string">https://developer.paypal.com/docs/business/pay-later/{{countryCode}}/commerce-platforms/magento2/magento-paypal/</expectedResult>
            <actualResult type="string">$grabCommentText</actualResult>
        </assertStringContainsString>
    </actionGroup>
</actionGroups>
