Skip to content

Commit 2ec17e8

Browse files
committed
ACQE-7005: Several Terms and Conditions with different types are presented on Payflow Link review page
Added file in checkout agreement module
1 parent 8eaf6ef commit 2ec17e8

File tree

2 files changed

+101
-19
lines changed

2 files changed

+101
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontSeveralTermsAndConditionsWithDifferentTypesArePresentedOnPayflowLinkReviewPageTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Paypal payflow link"/>
14+
<title value="Several Terms and Conditions with different types are presented on Payflow Link review page"/>
15+
<description value="Admin creates several terms and conditions with different types and assert them on the payment type payflow link in the storefront's review and payments page"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-5204"/>
18+
</annotations>
19+
<before>
20+
<!-- Enable Terms And Condition-->
21+
<magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/>
22+
<!--Create a simple product-->
23+
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
24+
<!--Create a US Customer-->
25+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
26+
<!--Login to admin-->
27+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
28+
<!--Create terms and conditions-->
29+
<actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewTerm"/>
30+
<actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="fillNewTerm">
31+
<argument name="term" value="newHtmlTerm"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveNewTerm"/>
34+
<actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewHTMLTerm"/>
35+
<actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="fillNewHTMLTerm">
36+
<argument name="term" value="newHtmlAutomaticallyTerm"/>
37+
</actionGroup>
38+
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveNewHTMLTerm"/>
39+
<!--Clear cache and reindex-->
40+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
41+
<argument name="indices" value=""/>
42+
</actionGroup>
43+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
44+
<argument name="tags" value="config full_page"/>
45+
</actionGroup>
46+
</before>
47+
<after>
48+
<!--Admin delete terms and condition-->
49+
<actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/>
50+
<actionGroup ref="AdminDeleteAllTermConditionsActionGroup" stepKey="deleteAllTerms"/>
51+
<!--Delete created product-->
52+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
53+
<!-- Delete created customer -->
54+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
55+
<!--Logout-->
56+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
57+
</after>
58+
<!--Login to storefront and open created simple product-->
59+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
60+
<argument name="Customer" value="$createCustomer$" />
61+
</actionGroup>
62+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
63+
<argument name="product" value="$$createSimpleProduct$$"/>
64+
</actionGroup>
65+
<!-- Add product to cart and then select shipping method on checkout page-->
66+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
67+
<argument name="productName" value="$createSimpleProduct.name$"/>
68+
</actionGroup>
69+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/>
70+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
71+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate">
72+
<argument name="shippingMethodName" value="Flat Rate"/>
73+
</actionGroup>
74+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>
75+
<!--Assert the created terms and conditions-->
76+
<!--<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" visible="true" after="clickNextOnShippingStep" stepKey="selectCreditCardPaymentMethod"/>-->
77+
<waitForText selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementLink}}" userInput="{{newHtmlTerm.checkboxText}}" after="selectCreditCardPaymentMethod" stepKey="seeTermInCheckout"/>
78+
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreement(enabledHtmlTerm.checkboxText)}}" stepKey="waitToClickOnHTMLTerm"/>
79+
<click selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreement(enabledHtmlTerm.checkboxText)}}" stepKey="clickOnHTMLTerm"/>
80+
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlAutomaticallyTerm.content)}}" stepKey="verifyAutomaticTermContentTextMessage"/>
81+
</test>
82+
</tests>

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontSeveralTermsAndConditionsWithDifferentTypesArePresentedOnPayflowLinkReviewPageTest.xml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
</annotations>
2121
<before>
2222
<!-- Enable Terms And Condition-->
23-
<magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/>
24-
<!--Create a simple product-->
23+
<!--<magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/>
24+
&lt;!&ndash;Create a simple product&ndash;&gt;
2525
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
26-
<!--Create a US Customer-->
26+
&lt;!&ndash;Create a US Customer&ndash;&gt;
2727
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
28-
<!--Login to admin-->
28+
&lt;!&ndash;Login to admin&ndash;&gt;
2929
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
30-
<!--Create terms and conditions-->
30+
&lt;!&ndash;Create terms and conditions&ndash;&gt;
3131
<actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewTerm"/>
3232
<actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="fillNewTerm">
3333
<argument name="term" value="newHtmlTerm"/>
@@ -38,33 +38,33 @@
3838
<argument name="term" value="newHtmlAutomaticallyTerm"/>
3939
</actionGroup>
4040
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveNewHTMLTerm"/>
41-
<!--Clear cache and reindex-->
41+
&lt;!&ndash;Clear cache and reindex&ndash;&gt;
4242
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
4343
<argument name="indices" value=""/>
4444
</actionGroup>
4545
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
4646
<argument name="tags" value="config full_page"/>
47-
</actionGroup>
47+
</actionGroup>-->
4848
</before>
4949
<after>
5050
<!--Admin delete terms and condition-->
51-
<actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/>
51+
<!--<actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/>
5252
<actionGroup ref="AdminDeleteAllTermConditionsActionGroup" stepKey="deleteAllTerms"/>
53-
<!--Delete created product-->
53+
&lt;!&ndash;Delete created product&ndash;&gt;
5454
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
55-
<!-- Delete created customer -->
55+
&lt;!&ndash; Delete created customer &ndash;&gt;
5656
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
57-
<!--Logout-->
58-
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
57+
&lt;!&ndash;Logout&ndash;&gt;
58+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>-->
5959
</after>
6060
<!--Login to storefront and open created simple product-->
61-
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
61+
<!--<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
6262
<argument name="Customer" value="$createCustomer$" />
6363
</actionGroup>
6464
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
6565
<argument name="product" value="$$createSimpleProduct$$"/>
6666
</actionGroup>
67-
<!-- Add product to cart and then select shipping method on checkout page-->
67+
&lt;!&ndash; Add product to cart and then select shipping method on checkout page&ndash;&gt;
6868
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
6969
<argument name="productName" value="$createSimpleProduct.name$"/>
7070
</actionGroup>
@@ -73,12 +73,12 @@
7373
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate">
7474
<argument name="shippingMethodName" value="Flat Rate"/>
7575
</actionGroup>
76-
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>
77-
<!-- Checkout select Credit Card (Payflow link) and assert the created terms and conditions-->
78-
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" visible="true" stepKey="selectCreditCardPaymentMethod"/>
79-
<waitForText selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementLink}}" userInput="{{newHtmlTerm.checkboxText}}" stepKey="seeTermInCheckout"/>
76+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>-->
77+
<!-- Checkout select Credit Card (Payflow link)-->
78+
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" visible="true" after="clickNextOnShippingStep" stepKey="selectCreditCardPaymentMethod"/>
79+
<!--<waitForText selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementLink}}" userInput="{{newHtmlTerm.checkboxText}}" stepKey="seeTermInCheckout"/>
8080
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreement(enabledHtmlTerm.checkboxText)}}" stepKey="waitToClickOnHTMLTerm"/>
8181
<click selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreement(enabledHtmlTerm.checkboxText)}}" stepKey="clickOnHTMLTerm"/>
82-
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlAutomaticallyTerm.content)}}" stepKey="verifyAutomaticTermContentTextMessage"/>
82+
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlAutomaticallyTerm.content)}}" stepKey="verifyAutomaticTermContentTextMessage"/>-->
8383
</test>
8484
</tests>

0 commit comments

Comments
 (0)