|
| 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="AdminConfigPaymentsAdvancedForPaypalCreditTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Payment methods"/> |
| 14 | + <title value="Check config for PayPal Credit in Unites States"/> |
| 15 | + <description value="Check paypal Credit payment option's enablement and disablement based on the configuration setting in backend"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-5151"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 21 | + <createData entity="SimpleSubCategory" stepKey="simpleCategory"/> |
| 22 | + <createData entity="SimpleProduct" stepKey="simpleProduct"> |
| 23 | + <requiredEntity createDataKey="simpleCategory"/> |
| 24 | + </createData> |
| 25 | + <magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/> |
| 26 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 30 | + <magentoCLI command="config:set paypal/general/merchant_country 0" stepKey="setMerchantCountryAsUS"/> |
| 31 | + <magentoCLI command="config:set payment/payflow_advanced/active 0" stepKey="disablePaymentsAdvanced"/> |
| 32 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 33 | + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> |
| 34 | + <deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/> |
| 35 | + </after> |
| 36 | + <!--Admin navigate to payment configuration page and assert no other paypal payment is enabled--> |
| 37 | + <actionGroup ref="AdminConfigForPaymentsAdvancedPaypalCreditActionGroup" stepKey="configPaymentsAdvanced"/> |
| 38 | + <!--Clear paypal credit config related data--> |
| 39 | + <actionGroup ref="AdminClearPaymentAdvancedDataActionGroup" stepKey="clearPaymentsAdvanced"/> |
| 40 | + <!--Enable Payment Advanced and Paypal Credit--> |
| 41 | + <actionGroup ref="AdminEnablePaymentAdvancedConfigurationActionGroup" stepKey="enablePaymentsAdvanced"/> |
| 42 | + <!--Save Configuration--> |
| 43 | + <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfigs"/> |
| 44 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 45 | + <argument name="indices" value=""/> |
| 46 | + </actionGroup> |
| 47 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
| 48 | + <argument name="tags" value="config full_page"/> |
| 49 | + </actionGroup> |
| 50 | + |
| 51 | + <!--Login to storefront as guest customer--> |
| 52 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/> |
| 53 | + <waitForPageLoad stepKey="waitForProductPage"/> |
| 54 | + <!--Add simple product--> |
| 55 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart"> |
| 56 | + <argument name="product" value="$simpleProduct$"/> |
| 57 | + </actionGroup> |
| 58 | + <!--Go to cart page--> |
| 59 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="gotoCart"/> |
| 60 | + <!--Open cart page and proceed to checkout--> |
| 61 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckoutCartPage"/> |
| 62 | + <actionGroup ref="StorefrontClickProceedToCheckoutActionGroup" stepKey="clickProceedToCheckout"/> |
| 63 | + <!--Fill Shipping Address--> |
| 64 | + <actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillShippingAddress"> |
| 65 | + <argument name="customer" value="$$createCustomer$$" /> |
| 66 | + <argument name="address" value="US_Address_TX"/> |
| 67 | + </actionGroup> |
| 68 | + <!-- Select shipping --> |
| 69 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectShippingMethodAsFlatRate"> |
| 70 | + <argument name="shippingMethodName" value="Flat Rate"/> |
| 71 | + </actionGroup> |
| 72 | + <!-- Go to Order review --> |
| 73 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> |
| 74 | + <waitForPageLoad stepKey="waitForLoadingMask"/> |
| 75 | + <!-- Assert Paypal Advanced and Paypal Credit Payment method --> |
| 76 | + <seeElement selector="{{AdminConfigPaymentsAdvancedSection.payFlowEdition}}" stepKey="assertPayflowEdition"/> |
| 77 | + <seeElement selector="{{AdminConfigPaymentsAdvancedSection.payFlowExpress}}" stepKey="assertPayflowExpress"/> |
| 78 | + <seeElement selector="{{AdminConfigPaymentsAdvancedSection.creditCardPayflowAdvanced}}" stepKey="assertCreditCardPayflowAdvanced"/> |
| 79 | + </test> |
| 80 | +</tests> |
0 commit comments