|
| 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="AdminConfigPaymentsAdvancedTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Payment methods"/> |
| 14 | + <title value="Configuration apply to Paypal Pay later message on Cart Page for Payment Advanced"/> |
| 15 | + <description value="Paypal Pay Later Message for Paypal Advanced should display on Admin Cart Page configuration"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="AC-5700"/> |
| 18 | + <group value="3rd_party_integration"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- US Customer is created --> |
| 22 | + <createData entity="Simple_US_Customer_CA" stepKey="createCustomer"/> |
| 23 | + <createData entity="SimpleProduct3" stepKey="simpleProduct"/> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + <actionGroup ref="AdminConfigPaymentsAdvancedActionGroup" stepKey="ConfigPaymentsAdvanced"/> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> |
| 29 | + <magentoCLI command="config:set payment/payflow_advanced/active 0" stepKey="disablePaymentsAdvanced"/> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 31 | + </after> |
| 32 | + <waitForElementClickable selector="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="waitForCheckoutCartPageToBeClickable"/> |
| 33 | + <click selector ="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="clickOnCart"/> |
| 34 | + <selectOption selector ="{{PaymentsAdvancedConfigSection.payLaterDisplay('us')}}" userInput="Yes" stepKey="enableDisplay"/> |
| 35 | + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> |
| 36 | + <!-- Reindex and cache flush --> |
| 37 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 38 | + <argument name="indices" value=""/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> |
| 41 | + <argument name="tags" value=""/> |
| 42 | + </actionGroup> |
| 43 | + <!-- Login to StoreFront --> |
| 44 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> |
| 45 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 46 | + </actionGroup> |
| 47 | + <!--Add simple product--> |
| 48 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart" > |
| 49 | + <argument name="product" value="$simpleProduct$"/> |
| 50 | + </actionGroup> |
| 51 | + <!--Go to cart page--> |
| 52 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="gotoCart"/> |
| 53 | + <waitForPageLoad stepKey="waitForShoppingCartPage"/> |
| 54 | + <scrollToTopOfPage stepKey="scrollToTop"/> |
| 55 | + <!--Switching to iFrame--> |
| 56 | + <switchToIFrame selector="{{PaymentsAdvancedConfigSection.payPalFrame}}" stepKey="switchToPaypalIFrame"/> |
| 57 | + <waitForElementVisible selector="{{PaymentsAdvancedConfigSection.payLaterMessage}}" stepKey="verifyPayLaterMessage"/> |
| 58 | + <switchToIFrame stepKey="switchBackMainIframe"/> |
| 59 | + <!--Change The Option in Position In Checkout cart Page--> |
| 60 | + <actionGroup ref="AdminConfigPaymentsAdvancedActionGroup" stepKey="ConfigPaymentsAdvanced"> |
| 61 | + </actionGroup> |
| 62 | + <waitForElementClickable selector="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="waitForAdminCarttPageTobeClickable"/> |
| 63 | + <click selector ="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="expandAdminCartePage"/> |
| 64 | + <selectOption selector ="{{PaymentsAdvancedConfigSection.displayOption('us')}}" userInput="Yes" stepKey="enableCartPageDisplay"/> |
| 65 | + <selectOption selector ="{{PaymentsAdvancedConfigSection.positionOption('us')}}" userInput="Under PayPal Checkout buttons" stepKey="updatedPositionValue"/> |
| 66 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexPage"> |
| 67 | + <argument name="indices" value=""/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCachePage"> |
| 70 | + <argument name="tags" value=""/> |
| 71 | + </actionGroup> |
| 72 | + <!-- Navigate Again to Storefront --> |
| 73 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToCustomerStoreFront"/> |
| 74 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="onPageShoppingCart"/> |
| 75 | + <scrollTo selector="{{PaymentsAdvancedConfigSection.payPalCheckoutField}}" stepKey="scrollToPaypalCheckout"/> |
| 76 | + <waitForPageLoad stepKey="waitForCartpageTobeLoaded"/> |
| 77 | + <switchToIFrame selector="{{PaymentsAdvancedConfigSection.payPalFrame}}" stepKey="switchToBuyNowPayLaterIFrame"/> |
| 78 | + <seeElement selector="{{PaymentsAdvancedConfigSection.payLaterMessage}}" stepKey="verifyBuyNowPayLaterMessage"/> |
| 79 | + <switchToIFrame stepKey="switchBackToMainPaypalFrame"/> |
| 80 | + </test> |
| 81 | +</tests> |
0 commit comments