|
| 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="CheckCreditButtonConfiguration"> |
| 12 | + <annotations> |
| 13 | + <features value="PayPal"/> |
| 14 | + <stories value="Button Configuration"/> |
| 15 | + <title value="Check Credit Button Configuration"/> |
| 16 | + <description value="Admin is able to customize Credit button"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="MC-10900"/> |
| 19 | + <skip> |
| 20 | + <issueId value="DEVOPS-3311"/> |
| 21 | + </skip> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> |
| 25 | + <createData entity="_defaultProduct" stepKey="createPreReqProduct"> |
| 26 | + <requiredEntity createDataKey="createPreReqCategory"/> |
| 27 | + </createData> |
| 28 | + <!-- Create Customer --> |
| 29 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 30 | + <actionGroup ref="LoginActionGroup" stepKey="login"/> |
| 31 | + <!--Config PayPal Express Checkout--> |
| 32 | + <comment userInput="config PayPal Express Checkout" stepKey="commemtConfigPayPalExpressCheckout"/> |
| 33 | + <actionGroup ref="ConfigPayPalExpressCheckout" stepKey="ConfigPayPalExpressCheckout"/> |
| 34 | + </before> |
| 35 | + <after> |
| 36 | + <deleteData stepKey="deleteCategory" createDataKey="createPreReqCategory"/> |
| 37 | + <deleteData stepKey="deleteProduct" createDataKey="createPreReqProduct"/> |
| 38 | + <deleteData stepKey="deleteCustomer" createDataKey="createCustomer"/> |
| 39 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
| 40 | + </after> |
| 41 | + <amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/> |
| 42 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 43 | + <!--Navigate to button configuration setting--> |
| 44 | + <comment userInput="Navigate to button configuration setting in Admin site" stepKey="commentNavigateToButtonConfigurationInAdmin"/> |
| 45 | + <actionGroup ref="OpenPayPalButtonCheckoutPage" stepKey="openPayPalButtonCheckoutPage"/> |
| 46 | + <waitForElement selector="{{ButtonCustomization.customizeDrpDown}}" stepKey="seeCustomizeDropDown"/> |
| 47 | + <selectOption selector="{{ButtonCustomization.customizeDrpDown}}" userInput="Yes" stepKey="enableButtonCustomization"/> |
| 48 | + <!--Verify Credit Button value--> |
| 49 | + <comment userInput="Verify Credit Button value" stepKey="commentVerifyDefaultValue2"/> |
| 50 | + <selectOption selector="{{ButtonCustomization.label}}" userInput="{{PayPalLabel.credit}}" stepKey="selectCreditAsLabel"/> |
| 51 | + <seeElement selector="{{ButtonCustomization.size}}" stepKey="seeSize2"/> |
| 52 | + <seeElement selector="{{ButtonCustomization.shape}}" stepKey="seeShape2"/> |
| 53 | + <dontSeeElement selector="{{ButtonCustomization.layout}}" stepKey="dontSeeLayout"/> |
| 54 | + <dontSeeElement selector="{{ButtonCustomization.color}}" stepKey="dontSeeColor"/> |
| 55 | + <!--Customize Credit Button--> |
| 56 | + <selectOption selector="{{ButtonCustomization.size}}" userInput="{{PayPalSize.medium}}" stepKey="selectSize"/> |
| 57 | + <selectOption selector="{{ButtonCustomization.shape}}" userInput="{{PayPalShape.pill}}" stepKey="selectShape"/> |
| 58 | + <!--Save configuration--> |
| 59 | + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> |
| 60 | + <waitForPageLoad stepKey="waitForConfigSave"/> |
| 61 | + <openNewTab stepKey="openNewTab"/> |
| 62 | + <amOnPage url="/" stepKey="openStorefront"/> |
| 63 | + <!--Login to storefront as previously created customer--> |
| 64 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 65 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 66 | + </actionGroup> |
| 67 | + <actionGroup ref="addProductToCheckoutPage" stepKey="addProductToCheckoutPage"> |
| 68 | + <argument name="Category" value="$$createPreReqCategory$$"/> |
| 69 | + </actionGroup> |
| 70 | + <!--set ID for iframe of PayPal group button--> |
| 71 | + <executeJS function="jQuery('.zoid-component-frame.zoid-visible').attr('id', 'myIframe')" stepKey="clickOrderLink"/> |
| 72 | + <!--switch to iframe of PayPal group button--> |
| 73 | + <comment userInput="switch to iframe of PayPal group button" stepKey="commentSwitchToIframe"/> |
| 74 | + <switchToIFrame userInput="myIframe" stepKey="clickPrintOrderLink"/> |
| 75 | + <waitForElementVisible selector="{{CheckoutPaymentSection.PayPalBtn}}" stepKey="waitForPayPalBtn"/> |
| 76 | + <seeElement selector="{{PayPalButtonOnStorefront.label(PayPalLabel.credit)}}{{PayPalButtonOnStorefront.size(PayPalSize.medium)}}" stepKey="seeButtonInMediumSize"/> |
| 77 | + <seeElement selector="{{PayPalButtonOnStorefront.label(PayPalLabel.credit)}}{{PayPalButtonOnStorefront.shape(PayPalShape.pill)}}" stepKey="seeButtonInPillShape"/> |
| 78 | + </test> |
| 79 | +</tests> |
0 commit comments