Skip to content

Commit 3c56799

Browse files
committed
Merge branch 'ACQE-7005' into ACQE-7118-mainline-deployment
2 parents a55047b + 6769b09 commit 3c56799

4 files changed

+140
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -19,5 +19,7 @@
1919
<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"/>
2020
<element name="manualCheckoutAgreementLink" type="button" selector="//input[starts-with(@id,'{{paymentName}}')]/..//label//span" parameterized="true"/>
2121
<element name="automaticCheckoutAgreementLink" type="button" selector="//input[starts-with(@id,'{{paymentName}}')]/..//following-sibling::div//button//span" parameterized="true"/>
22+
<element name="checkoutAgreement" type="button" selector="(//*[@class='checkout-agreements fieldset']//button/span[text()='{{agreement}}'])[4]" parameterized="true"/>
23+
<element name="checkoutAgreementContent" type="button" selector=".//*[@class='modal-popup agreements-modal modal-slide _inner-scroll _show']//div[@class='checkout-agreements-item-content']"/>
2224
</section>
2325
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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+
<group value="pr_exclude"/>
19+
</annotations>
20+
<before>
21+
<!-- Enable Terms And Condition-->
22+
<magentoCLI command="config:set checkout/options/enable_agreements 1" stepKey="setEnableTermsOnCheckout"/>
23+
<!--Create a simple product-->
24+
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
25+
<!--Create a US Customer-->
26+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
27+
<!--Login to admin-->
28+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
29+
<!--Create terms and conditions-->
30+
<actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewTerm"/>
31+
<actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="fillNewTerm">
32+
<argument name="term" value="newHtmlTerm"/>
33+
</actionGroup>
34+
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveNewTerm"/>
35+
<actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewHTMLTerm"/>
36+
<actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="fillNewHTMLTerm">
37+
<argument name="term" value="newHtmlAutomaticallyTerm"/>
38+
</actionGroup>
39+
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveNewHTMLTerm"/>
40+
<!--Clear cache and reindex-->
41+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
42+
<argument name="indices" value=""/>
43+
</actionGroup>
44+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
45+
<argument name="tags" value="config full_page"/>
46+
</actionGroup>
47+
</before>
48+
<after>
49+
<!--Admin delete terms and condition-->
50+
<actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/>
51+
<actionGroup ref="AdminDeleteAllTermConditionsActionGroup" stepKey="deleteAllTerms"/>
52+
<!--Delete created product-->
53+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
54+
<!-- Delete created customer -->
55+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
56+
<!--Logout-->
57+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
58+
</after>
59+
<!--Login to storefront and open created simple product-->
60+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
61+
<argument name="Customer" value="$createCustomer$" />
62+
</actionGroup>
63+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
64+
<argument name="product" value="$$createSimpleProduct$$"/>
65+
</actionGroup>
66+
<!-- Add product to cart and then select shipping method on checkout page-->
67+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
68+
<argument name="productName" value="$createSimpleProduct.name$"/>
69+
</actionGroup>
70+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/>
71+
<actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/>
72+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate">
73+
<argument name="shippingMethodName" value="Flat Rate"/>
74+
</actionGroup>
75+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="clickNextOnShippingStep"/>
76+
<!--Assert the created terms and conditions-->
77+
<waitForText selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreementLink('Credit Card (Payflow Link)')}}" userInput="{{newHtmlTerm.checkboxText}}" after="selectCreditCardPaymentMethod" stepKey="seeTermInCheckout"/>
78+
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreement(newHtmlAutomaticallyTerm.checkboxText)}}" stepKey="waitToClickOnHTMLTerm"/>
79+
<click selector="{{StorefrontCheckoutAgreementsSection.checkoutAgreement(newHtmlAutomaticallyTerm.checkboxText)}}" stepKey="clickOnHTMLTerm"/>
80+
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlAutomaticallyTerm.content)}}" stepKey="verifyAutomaticTermContentTextMessage"/>
81+
</test>
82+
</tests>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="AdminConfigurePaypalPayflowLinkSuite">
10+
<before>
11+
<!-- Login -->
12+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
13+
<!--Config PayPal Payflow Link-->
14+
<actionGroup ref="AdminEnablePayPalPayFlowLinkActionGroup" stepKey="ConfigPayPalPayFlowLink">
15+
<argument name="credentials" value="SamplePaypalPaymentsFlowLinkConfig"/>
16+
</actionGroup>
17+
</before>
18+
<after>
19+
<!-- Cleanup Paypal configurations -->
20+
<actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/>
21+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
22+
<argument name="tags" value="config full_page"/>
23+
</actionGroup>
24+
</after>
25+
<include>
26+
<group name="paypalPayflowLink"/>
27+
</include>
28+
</suite>
29+
</suites>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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+
<group value="paypalPayflowLink"/>
19+
<group value="3rd_party_integration"/>
20+
<group value="pr_exclude"/>
21+
</annotations>
22+
<!-- Checkout select Credit Card (Payflow link)-->
23+
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Link)')}}" visible="true" after="clickNextOnShippingStep" stepKey="selectCreditCardPaymentMethod"/>
24+
</test>
25+
</tests>

0 commit comments

Comments
 (0)