|
| 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="AdminCancelPaypalExpressCheckoutTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Cancel an order with paypal express checkout"/> |
| 14 | + <title value="Cancel an order with paypal express checkout with valid credentials"/> |
| 15 | + <description value="Cancel an order with paypal express checkout as payment method"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="AC-6116"/> |
| 18 | + <group value="3rd_party_integration"/> |
| 19 | + <group value="pr_exclude"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Create Product --> |
| 23 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
| 24 | + <field key="price">10</field> |
| 25 | + </createData> |
| 26 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 27 | + <!-- Configure Paypal Express Checkout --> |
| 28 | + <actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress"> |
| 29 | + <argument name="credentials" value="SamplePaypalExpressConfig2"/> |
| 30 | + </actionGroup> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/> |
| 34 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 35 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 36 | + </after> |
| 37 | + <!-- Go to storefront home page --> |
| 38 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/> |
| 39 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPage"> |
| 40 | + <argument name="product" value="$createSimpleProduct$"/> |
| 41 | + </actionGroup> |
| 42 | + <!-- Click on PayPal payment button --> |
| 43 | + <actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/> |
| 44 | + <!-- display PayPal popup and close the PayPal popup--> |
| 45 | + <switchToNextTab stepKey="switchToDownloadedLinkTab"/> |
| 46 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 47 | + <closeTab stepKey="closeStorefrontTab"/> |
| 48 | + <waitForPageLoad stepKey="waitForPageLoadAgain" time="30"/> |
| 49 | + <!-- Goes to Shopping Cart page and Product is added to cart --> |
| 50 | + <seeInCurrentUrl url="{{CheckoutCartPage.url}}" stepKey="assertUrl"/> |
| 51 | + <seeInField userInput="1" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField20"/> |
| 52 | + <!-- Again Click on PayPal payment button --> |
| 53 | + <actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtnAgain"> |
| 54 | + <argument name="elementNumber" value="1"/> |
| 55 | + <argument name="frameName" value="myFrame2"/> |
| 56 | + </actionGroup> |
| 57 | + <!-- Login to Paypal in-context--> |
| 58 | + <actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/> |
| 59 | + <actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/> |
| 60 | + <actionGroup ref="StorefrontPlaceOrderOnOrderReviewPageActionGroup" stepKey="clickPlaceOrderBtn"/> |
| 61 | + <!-- I see order successful Page --> |
| 62 | + <waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/> |
| 63 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments