|
| 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 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontAssertSeveralTermsAndConditionsOnPayPalExpressCheckoutReviewPageTest"> |
| 12 | + <annotations> |
| 13 | + <features value="CheckoutAgreements"/> |
| 14 | + <stories value="Checkout agreements and Paypal express checkout"/> |
| 15 | + <title value="Assert Several Terms And Conditions On PayPal Express Checkout Review Page"/> |
| 16 | + <description value="Several Terms and Conditions with different types are shown on PayPal express checkout review page"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4430"/> |
| 19 | + <group value="paypalExpress"/> |
| 20 | + <group value="3rd_party_integration" /> |
| 21 | + <group value="pr_exclude" /> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/> |
| 25 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"/> |
| 26 | + <actionGroup ref="AdminEnableTermsAndConditionsConfigurationActionGroup" stepKey="EnableTermsAndConditions"/> |
| 27 | + <createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <!--Delete created data--> |
| 31 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 32 | + <actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/> |
| 33 | + <actionGroup ref="AdminDeleteAllTermConditionsActionGroup" stepKey="deleteAllTerms"/> |
| 34 | + <actionGroup ref="AdminDisableTermsAndConditionsConfigurationActionGroup" stepKey="disableTermsAndConditions"/> |
| 35 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> |
| 36 | + </after> |
| 37 | + <!-- create manual term --> |
| 38 | + <actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewTermForManualTerm"/> |
| 39 | + <actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="createManualTerm"> |
| 40 | + <argument name="term" value="newHtmlTerm"/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveManualTerm"/> |
| 43 | + <!-- create automatic term --> |
| 44 | + <actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewTermForAutomaticTerm"/> |
| 45 | + <actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="createAutomaticTerm"> |
| 46 | + <argument name="term" value="newHtmlAutomaticallyTerm"/> |
| 47 | + </actionGroup> |
| 48 | + <actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveAutomaticTerm"/> |
| 49 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 50 | + <argument name="indices" value=""/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
| 53 | + <argument name="tags" value="config full_page"/> |
| 54 | + </actionGroup> |
| 55 | + <!-- Login as customer --> |
| 56 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> |
| 57 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 58 | + </actionGroup> |
| 59 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart"> |
| 60 | + <argument name="product" value="$createSimpleProduct$"/> |
| 61 | + </actionGroup> |
| 62 | + <!--Navigate to checkout--> |
| 63 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/> |
| 64 | + <!-- Click next button to open payment section --> |
| 65 | + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/> |
| 66 | + <!-- Click on PayPal payment radio button --> |
| 67 | + <waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/> |
| 68 | + <click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/> |
| 69 | + <!-- Verify both manual and automatic are present --> |
| 70 | + <waitForText selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" userInput="{{newHtmlTerm.checkboxText}}" stepKey="seeManualTermTextInCheckoutIsPresent"/> |
| 71 | + <waitForText selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" userInput="{{newHtmlAutomaticallyTerm.checkboxText}}" stepKey="seeAutomaticTermTextInCheckoutIsPresent"/> |
| 72 | + <!-- open manual terms and conditions and verify content messages--> |
| 73 | + <waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="waitForManualTermTextInCheckoutIsClickable"/> |
| 74 | + <click selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="clickManualTermTextInCheckout"/> |
| 75 | + <waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlTerm.content)}}" stepKey="verifyManualTermContentTextMessage"/> |
| 76 | + <waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.agreementClose}}" stepKey="waitForCloseToBeClickable"/> |
| 77 | + <click selector="{{StorefrontCheckoutAgreementsSection.agreementClose}}" stepKey="ClickOnClose"/> |
| 78 | + <!-- open automatic terms and conditions and verify content messages--> |
| 79 | + <waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="waitForAutomaticTermTextInCheckoutIsClickable"/> |
| 80 | + <click selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="clickAutomaticTermTextInCheckoutIsClickable"/> |
| 81 | + <waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlAutomaticallyTerm.content)}}" stepKey="verifyAutomaticTermContentTextMessage"/> |
| 82 | + </test> |
| 83 | +</tests> |
0 commit comments