|
| 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="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="MAJOR"/> |
| 17 | + <testCaseId value="AC-5700"/> |
| 18 | + <group value="3rd_party_integration"/> |
| 19 | + <group value="pr_exclude"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="SimpleSubCategory" stepKey="simpleCategory"/> |
| 23 | + <createData entity="SimpleProduct3" stepKey="simpleProduct"> |
| 24 | + <requiredEntity createDataKey="simpleCategory"/> |
| 25 | + </createData> |
| 26 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 27 | + <actionGroup ref="AdminConfigPaymentsAdvancedActionGroup" stepKey="ConfigPaymentsAdvanced"/> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> |
| 31 | + <deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/> |
| 32 | + <magentoCLI command="config:set payment/payflow_advanced/active 0" stepKey="disablePaymentsAdvanced"/> |
| 33 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 34 | + </after> |
| 35 | + <waitForElementClickable selector="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="waitForCheckoutCartPageToBeClickable"/> |
| 36 | + <click selector ="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="clickCarteBtn"/> |
| 37 | + <selectOption selector ="{{PaymentsAdvancedConfigSection.payLaterDisplay('us')}}" userInput="Yes" stepKey="enableDisplay"/> |
| 38 | + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> |
| 39 | + <!-- Reindex and cache flush --> |
| 40 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 41 | + <argument name="indices" value=""/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache"> |
| 44 | + <argument name="tags" value=""/> |
| 45 | + </actionGroup> |
| 46 | + <!--Navigate to Storefront--> |
| 47 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/> |
| 48 | + <waitForPageLoad stepKey="waitForProductPage"/> |
| 49 | + <!--Add simple product--> |
| 50 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart" > |
| 51 | + <argument name="product" value="$simpleProduct$"/> |
| 52 | + </actionGroup> |
| 53 | + <!--Go to cart page--> |
| 54 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="gotoCart"/> |
| 55 | + <waitForPageLoad stepKey="waitForShoppingCartPage"/> |
| 56 | + <!--Switching to iFrame--> |
| 57 | + <switchToIFrame selector="{{PaymentsAdvancedConfigSection.payPalFrame}}" stepKey="switchToPaypalIFrame"/> |
| 58 | + <seeElement selector="{{PaymentsAdvancedConfigSection.payLaterMessage}}" stepKey="verifyPayLaterMessage"/> |
| 59 | + <switchToIFrame stepKey="switchBackMainIframe"/> |
| 60 | + <!--Change The Option in Position In Checkout cart Page--> |
| 61 | + <actionGroup ref="AdminConfigPaymentsAdvancedActionGroup" stepKey="ConfigPaymentsAdvanced"> |
| 62 | + </actionGroup> |
| 63 | + <waitForElementClickable selector="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="waitForAdminCarttPageTobeClickable"/> |
| 64 | + <click selector ="{{PaymentsAdvancedConfigSection.cartBtn('us')}}" stepKey="expandAdminCartePage"/> |
| 65 | + <selectOption selector ="{{PaymentsAdvancedConfigSection.displayOption('us')}}" userInput="Yes" stepKey="enableCartPageDisplay"/> |
| 66 | + <selectOption selector ="{{PaymentsAdvancedConfigSection.positionOption('us')}}" userInput="Under PayPal Checkout buttons" stepKey="updatedPositionValue"/> |
| 67 | + <waitForElementClickable selector="{{PaymentsAdvancedConfigSection.categoryExpand('us')}}" stepKey="waitForcategoryPageTobeClickable"/> |
| 68 | + <click selector ="{{PaymentsAdvancedConfigSection.categoryExpand('us')}}" stepKey="expandCategoryePage"/> |
| 69 | + <selectOption selector ="{{PaymentsAdvancedConfigSection.categoryDisplay('us')}}" userInput="Yes" stepKey="enableCategorypageDisplay"/> |
| 70 | + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfiguration"/> |
| 71 | + <!-- Reindex and cache flush --> |
| 72 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexPage"> |
| 73 | + <argument name="indices" value=""/> |
| 74 | + </actionGroup> |
| 75 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCachePage"> |
| 76 | + <argument name="tags" value=""/> |
| 77 | + </actionGroup> |
| 78 | + <!-- Navigate Again to Storefront --> |
| 79 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToCustomerStoreFront"/> |
| 80 | + <waitForElementClickable selector="{{PaymentsAdvancedConfigSection.categoryClick}}" stepKey="waitForCategryToClickable"/> |
| 81 | + <click selector ="{{PaymentsAdvancedConfigSection.categoryClick}}" stepKey="clickCatagoryeButton"/> |
| 82 | + <waitForPageLoad stepKey="waitForCartpageTobeLoaded"/> |
| 83 | + <switchToIFrame selector="{{PaymentsAdvancedConfigSection.payPalFrame}}" stepKey="switchToBuyNowPayLaterIFrame"/> |
| 84 | + <seeElement selector="{{PaymentsAdvancedConfigSection.payLaterMessage}}" stepKey="verifyBuyNowPayLaterMessage"/> |
| 85 | + <switchToIFrame stepKey="switchBackToMainPaypalFrame"/> |
| 86 | + </test> |
| 87 | +</tests> |
0 commit comments