Skip to content

Commit 12c63a4

Browse files
authored
Merge pull request #9072 from magento-gl/ACQE-6789-1
ACQE-6789 : Assert Several Terms And Conditions On PayPal BrainTree Review Page
2 parents 4ff8b0f + 926388c commit 12c63a4

File tree

5 files changed

+57
-1
lines changed

5 files changed

+57
-1
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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,21 @@
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>
72+
</entity>
5673
</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>

app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@
6565
<!--Verify order item row-->
6666
<waitForElementVisible selector="{{AdminOrderItemsOrderedSection.productPrice('2')}}" stepKey="waitOrderItemPriceToBeVisible"/>
6767
<see selector="{{AdminOrderItemsOrderedSection.productPrice('2')}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderItemPrice"/>
68+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache1">
69+
<argument name="tags" value=""/>
70+
</actionGroup>
6871
<!--Verify totals on Order page-->
6972
<scrollTo selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="scrollToOrderGrandTotal"/>
7073
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" stepKey="waitOrderSubtotalToBeVisible"/>
7174
<see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderSubTotal"/>
7275
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Shipping')}}" stepKey="waitOrderShippingToBeVisible"/>
7376
<see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.shipping}}" stepKey="seeOrderShipping"/>
7477
<waitForElementVisible selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="waitOrderGrandTotalToBeVisible"/>
75-
<see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.grandTotal}}" stepKey="seeCorrectGrandTotal"/>
78+
<waitForText selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="{{AdminOrderSimpleProductWithCatalogRule.grandTotal}}" stepKey="seeCorrectGrandTotal"/>
7679
</test>
7780
</tests>

0 commit comments

Comments
 (0)