<?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="SectionReplacementTest">
        <click stepKey="selectorReplace" selector="{{SampleSection.simpleElement}}"/>
        <click stepKey="selectorReplaceTimeout" selector="{{SampleSection.timeoutElement}}"/>

        <click stepKey="selectorReplaceOneParam" selector="{{SampleSection.oneParamElement('stringLiteral')}}"/>
        <click stepKey="selectorReplaceTwoParam" selector="{{SampleSection.twoParamElement('stringLiteral1', 'stringLiteral2')}}"/>
        <click stepKey="selectorReplaceThreeParam" selector="{{SampleSection.threeParamElement('stringLiteral1', 'stringLiteral2', 'stringLiteral3')}}"/>
        <click stepKey="selectorReplaceThreeParamOneDupe" selector="{{SampleSection.threeOneDuplicateParamElement('stringLiteral1', 'stringLiteral2', 'stringLiteral3')}}"/>

        <click stepKey="selectorReplaceOneParamDataRef" selector="{{SampleSection.oneParamElement(simpleData.firstname)}}"/>
        <click stepKey="selectorReplaceTwoParamDataRef" selector="{{SampleSection.twoParamElement(simpleData.firstname, simpleData.lastname)}}"/>
        <click stepKey="selectorReplaceThreeParamDataRef" selector="{{SampleSection.threeParamElement(simpleData.firstname, simpleData.lastname, simpleData.middlename)}}"/>
        <click stepKey="selectorReplaceThreeParamOneDupeDataRef" selector="{{SampleSection.threeOneDuplicateParamElement(simpleData.firstname, simpleData.lastname, simpleData.middlename)}}"/>

        <click stepKey="selectorReplaceOneParamDataRefMSQPrefix" selector="{{SampleSection.oneParamElement(uniqueData.firstname)}}"/>
        <click stepKey="selectorReplaceTwoParamDataRefMSQPrefix" selector="{{SampleSection.twoParamElement(uniqueData.firstname, 'stringLiteral2')}}"/>
        <click stepKey="selectorReplaceThreeParamDataRefMSQPrefix" selector="{{SampleSection.threeParamElement(uniqueData.firstname, 'stringLiteral2', 'stringLiteral3')}}"/>
        <click stepKey="selectorReplaceThreeParamOneDupeDataRefMSQPrefix" selector="{{SampleSection.threeOneDuplicateParamElement(uniqueData.firstname, 'stringLiteral2', 'stringLiteral3')}}"/>

        <click stepKey="selectorReplaceOneParamDataRefMSQSuffix" selector="{{SampleSection.oneParamElement(uniqueData.lastname)}}"/>
        <click stepKey="selectorReplaceTwoParamDataRefMSQSuffix" selector="{{SampleSection.twoParamElement(uniqueData.lastname, 'stringLiteral2')}}"/>
        <click stepKey="selectorReplaceThreeParamDataRefMSQSuffix" selector="{{SampleSection.threeParamElement(uniqueData.lastname, 'stringLiteral2', 'stringLiteral3')}}"/>
        <click stepKey="selectorReplaceThreeParamOneDupeDataRefMSQSuffix" selector="{{SampleSection.threeOneDuplicateParamElement(uniqueData.lastname, 'stringLiteral2', 'stringLiteral3')}}"/>

        <createData entity="simpleData" stepKey="createdData"/>
        <click stepKey="selectorReplaceOneParamPersisted" selector="{{SampleSection.oneParamElement($createdData.firstname$)}}"/>
        <click stepKey="selectorReplaceTwoParamPersisted" selector="{{SampleSection.twoParamElement($createdData.firstname$, 'stringLiteral2')}}"/>
        <click stepKey="selectorReplaceThreeParamPersisted" selector="{{SampleSection.threeParamElement($createdData.firstname$, 'stringLiteral2', 'stringLiteral3')}}"/>
        <click stepKey="selectorReplaceThreeParamOneDupePersisted" selector="{{SampleSection.threeOneDuplicateParamElement($createdData.firstname$, 'stringLiteral2', 'stringLiteral3')}}"/>

        <click stepKey="selectorReplaceOneParamVariable" selector="{{SampleSection.oneParamElement({$data})}}"/>
        <click stepKey="selectorReplaceTwoParamVariable" selector="{{SampleSection.twoParamElement({$data1}, {$data2})}}"/>
        <click stepKey="selectorReplaceThreeParamVariable" selector="{{SampleSection.threeParamElement({$data1}, {$data2}, {$data3})}}"/>
        <click stepKey="selectorReplaceThreeParamVariableOneDupe" selector="{{SampleSection.threeOneDuplicateParamElement(simpleData.firstname, simpleData.lastname, simpleData.middlename)}}"/>

        <click stepKey="selectorReplaceThreeParamMixed1" selector="{{SampleSection.threeParamElement('stringLiteral1', $createdData.firstname$, simpleData.firstname)}}"/>
        <click stepKey="selectorReplaceThreeParamMixed2" selector="{{SampleSection.threeParamElement('stringLiteral1', $createdData.firstname$, {$data})}}"/>
        <click stepKey="selectorReplaceThreeParamMixedMSQPrefix" selector="{{SampleSection.threeParamElement('stringLiteral1', $createdData.firstname$, uniqueData.firstname)}}"/>
        <click stepKey="selectorReplaceThreeParamMixedMSQSuffix" selector="{{SampleSection.threeParamElement('stringLiteral1', $createdData.firstname$, uniqueData.lastname)}}"/>

        <click stepKey="selectorReplaceTwoParamElements" selector="{{SampleSection.oneParamElement('1')}}{{SampleSection.oneParamElement('2')}}"/>
        <click stepKey="selectorReplaceTwoParamMixedTypes" selector="{{SampleSection.oneParamElement('1')}}{{SampleSection.oneParamElement({$data})}}"/>

        <click stepKey="selectorParamWithEmptyString" selector="{{SampleSection.anotherTwoParamsElement('1', '')}}"/>
        <click stepKey="selectorParamWithASpace" selector="{{SampleSection.anotherTwoParamsElement('1', ' ')}}"/>
    </test>
</tests>
