|
| 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="DeleteSavedWithPayflowProCreditCardFromCustomerAccountTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Stored Payment Method"/> |
| 14 | + <title value="Delete saved with Payflow Pro credit card from customer account"/> |
| 15 | + <description value="Delete saved with Payflow Pro credit card from customer account"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-4838"/> |
| 18 | + <group value="paypal"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 22 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"/> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 24 | + <actionGroup ref="AdminPayPalPayflowProWithValutActionGroup" stepKey="ConfigPayPalExpress"> |
| 25 | + <argument name="credentials" value="SamplePaypalPaymentsProConfig"/> |
| 26 | + </actionGroup> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/> |
| 30 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/> |
| 31 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 32 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 33 | + </after> |
| 34 | + <!-- Login as Customer --> |
| 35 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 36 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 37 | + </actionGroup> |
| 38 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct1.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> |
| 39 | + <!-- Add product 1 to cart --> |
| 40 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 41 | + <argument name="productName" value="$createSimpleProduct1.name$"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 44 | + <!-- Select shipping --> |
| 45 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate"> |
| 46 | + <argument name="shippingMethodName" value="Flat Rate"/> |
| 47 | + </actionGroup> |
| 48 | + <!-- Go to Order review --> |
| 49 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> |
| 50 | + <!-- Checkout select Credit Card (Payflow Pro) and place order--> |
| 51 | + <waitForPageLoad stepKey="waitForLoadingMask"/> |
| 52 | + <waitForPageLoad stepKey="waitForPaymentPageLoad"/> |
| 53 | + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/> |
| 54 | + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/> |
| 55 | + <!--Fill Card Data --> |
| 56 | + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal"> |
| 57 | + <argument name="cardData" value="VisaDefaultCard"/> |
| 58 | + </actionGroup> |
| 59 | + <waitForPageLoad stepKey="waitForFillCardData"/> |
| 60 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> |
| 61 | + <!-- 2nd time order--> |
| 62 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct1.custom_attributes[url_key]$$)}}" stepKey="goToStorefront2"/> |
| 63 | + <!-- Add product 1 to cart --> |
| 64 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage2"> |
| 65 | + <argument name="productName" value="$createSimpleProduct1.name$"/> |
| 66 | + </actionGroup> |
| 67 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart2"/> |
| 68 | + <!-- Select shipping --> |
| 69 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate2"> |
| 70 | + <argument name="shippingMethodName" value="Flat Rate"/> |
| 71 | + </actionGroup> |
| 72 | + <!-- Go to Order review --> |
| 73 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage2"/> |
| 74 | + <!-- Checkout select Credit Card (Payflow Pro) and place order--> |
| 75 | + <waitForPageLoad stepKey="waitForLoadingMask2ndTime"/> |
| 76 | + <waitForPageLoad stepKey="waitForPaymentPageLoad2ndTime"/> |
| 77 | + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod2"/> |
| 78 | + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection2"/> |
| 79 | + <!--Fill Card Data --> |
| 80 | + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal2"> |
| 81 | + <argument name="cardData" value="Visa3DSecureCard"/> |
| 82 | + </actionGroup> |
| 83 | + <waitForPageLoad stepKey="waitForFillCardData2ndTime"/> |
| 84 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder2"/> |
| 85 | + <!-- Go to My Account --> |
| 86 | + <!-- Open My Account > Stored Payment Methods --> |
| 87 | + <amOnPage stepKey="goToMyAccountPage" url="{{StorefrontCustomerDashboardPage.url}}"/> |
| 88 | + <waitForPageLoad stepKey="waitForSideBarPageLoad2ndTime"/> |
| 89 | + <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu2"> |
| 90 | + <argument name="menu" value="Stored Payment Methods"/> |
| 91 | + </actionGroup> |
| 92 | + <!-- Assert Card number that ends with 1111 and exp Date--> |
| 93 | + <actionGroup ref="AssertStorefrontCustomerSavedCardActionGroup" stepKey="assertCustomerPaymentMethod"> |
| 94 | + <argument name="card" value="VisaDefaultCardInfo"/> |
| 95 | + </actionGroup> |
| 96 | + <!-- Assert Card number that ends with 0002 and exp Date--> |
| 97 | + <actionGroup ref="AssertStorefrontCustomerSavedCardActionGroup" stepKey="assertCustomerPaymentMethod2"> |
| 98 | + <argument name="card" value="Visa3DSecureCardInfo"/> |
| 99 | + </actionGroup> |
| 100 | + <!-- Delete second card--> |
| 101 | + <actionGroup ref="StorefrontDeleteStoredPaymentMethodActionGroup" stepKey="deleteStoredCard"> |
| 102 | + <argument name="card" value="Visa3DSecureCardInfo"/> |
| 103 | + </actionGroup> |
| 104 | + </test> |
| 105 | +</tests> |
0 commit comments