Skip to content

Commit 486d6c0

Browse files
committed
ACQE-6789 : Assert Several Terms And Conditions On PayPal BrainTree Review Page
Created actionGroup and elements
1 parent b08b7ea commit 486d6c0

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminDisableTermsAndConditionsConfigurationActionGroup">
11+
<annotations>
12+
<description>Disable Terms and Conditions On Configuration page.</description>
13+
</annotations>
14+
15+
<magentoCLI command="config:set {{disableTermsAndConditions.path}} {{disableTermsAndConditions.value}}" stepKey="DisableTermsAndConditions"/>
16+
</actionGroup>
17+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminEnableTermsAndConditionsConfigurationActionGroup">
11+
<annotations>
12+
<description>Enable Terms and Conditions On Configuration page.</description>
13+
</annotations>
14+
15+
<magentoCLI command="config:set {{enableTermsAndConditions.path}} {{enableTermsAndConditions.value}}" stepKey="EnableTermsAndConditions"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/CheckoutAgreements/Test/Mftf/Data/TermData.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,20 @@
5353
<data key="checkboxText" unique="suffix">test_checkbox</data>
5454
<data key="content" unique="suffix">TestMessage</data>
5555
</entity>
56+
<entity name="enableTermsAndConditions" type="term">
57+
<data key="path">checkout/options/enable_agreements</data>
58+
<data key="value">1</data>
59+
</entity>
60+
<entity name="disableTermsAndConditions" type="term">
61+
<data key="path">checkout/options/enable_agreements</data>
62+
<data key="value">0</data>
63+
</entity>
64+
<entity name="newHtmlAutomaticallyTerm" type="term">
65+
<data key="name" unique="suffix">Test name</data>
66+
<data key="isActive">Enabled</data>
67+
<data key="isHtml">HTML</data>
68+
<data key="mode">Automatically</data>
69+
<data key="storeView">Default Store View</data>
70+
<data key="checkboxText" unique="suffix">test_checkbox</data>
71+
<data key="content" unique="suffix">TestMessage</data>
5672
</entities>

app/code/Magento/CheckoutAgreements/Test/Mftf/Section/StorefrontCheckoutAgreementsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
<element name="checkoutAgreementButton" type="button" selector="div.checkout-agreements-block > div > div > div > label > button > span"/>
1414
<element name="checkoutAgreementErrorMessage" type="button" selector="div.checkout-agreement.field.choice.required > div.mage-error"/>
1515
<element name="checkoutAgreementCheckboxcheck" type="checkbox" selector="//span[text()='{{agreementname}}']/../../../input[@type='checkbox']" parameterized="true"/>
16+
<element name="contentArea" type="text" selector="//div[@class='modals-wrapper']//aside[@class='modal-popup agreements-modal modal-slide _inner-scroll _show']//div[@class='checkout-agreements-item-content' and contains(text(), '{{contentText}}')]" parameterized="true"/>
17+
<element name="close" type="button" selector="//div[@class='modals-wrapper']//aside[@class='modal-popup agreements-modal modal-slide _inner-scroll _show']//footer//span"/>
1618
</section>
1719
</sections>

0 commit comments

Comments
 (0)