|
| 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="AuthorizenetCreditCardInformationTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Authorizenet"/> |
| 14 | + <stories value="MAGETWO-91526 - Authorize.net Direct Post does not show credit card information"/> |
| 15 | + <title value="Checking credit card information of Authorize.net Direct Post"/> |
| 16 | + <description value="Checking credit card information of Authorize.net Direct Post"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-91526"/> |
| 19 | + <group value="Authorizenet"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 24 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 25 | + <requiredEntity createDataKey="createCategory"/> |
| 26 | + </createData> |
| 27 | + <createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/> |
| 28 | + <createData stepKey="setConfig" entity="AuthorizenetConfig"/> |
| 29 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 30 | + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <actionGroup ref="logout" stepKey="logout"/> |
| 34 | + <deleteData createDataKey="createCategory" stepKey="deleteProduct"/> |
| 35 | + <deleteData createDataKey="createProduct" stepKey="deleteCategory"/> |
| 36 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 37 | + <createData stepKey="setDefaultConfig" entity="AuthorizenetDefaultConfig"/> |
| 38 | + <createData stepKey="DisableConfigValues" entity="DisableAuthorizenetConfig"/> |
| 39 | + </after> |
| 40 | + <!--Create new order--> |
| 41 | + <actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="CreateNewOrder"> |
| 42 | + <argument name="customer" value="Simple_US_Customer_NY"/> |
| 43 | + </actionGroup> |
| 44 | + <!--Add product to order--> |
| 45 | + <click selector="{{OrdersGridSection.addProducts}}" stepKey="clickToAddProduct"/> |
| 46 | + <waitForPageLoad stepKey="waitForProductsOpened"/> |
| 47 | + <click selector="{{OrdersGridSection.selectProduct($$createProduct.name$$)}}" stepKey="selectProduct"/> |
| 48 | + <click stepKey="addProductsToOrder" selector="{{OrdersGridSection.addProductsToOrder}}"/> |
| 49 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 50 | + <!--Select shipping method--> |
| 51 | + <actionGroup ref="orderSelectFlatRateShipping" stepKey="orderSelectFlatRateShipping"/> |
| 52 | + <!--Fill Card data and submit order--> |
| 53 | + <click selector="{{AuthorizenetConfigurationSection.paymentMethod}}" stepKey="clickToSetPaymentMethod"/> |
| 54 | + <selectOption selector="{{AuthorizenetConfigurationSection.cardType}}" userInput="Visa" stepKey="SelectCreditCard"/> |
| 55 | + <fillField selector="{{AuthorizenetConfigurationSection.cardNumber}}" userInput="4111111111111111" stepKey="fillCardNumber"/> |
| 56 | + <selectOption selector="{{AuthorizenetConfigurationSection.month}}" userInput="01 - January" stepKey="SelectMonth"/> |
| 57 | + <click selector="{{AuthorizenetConfigurationSection.year}}" stepKey="clickYear"/> |
| 58 | + <waitForElementVisible selector="{{AuthorizenetConfigurationSection.afterTwoYear}}" stepKey="waitForDropDownMenuAppeared"/> |
| 59 | + <click selector="{{AuthorizenetConfigurationSection.afterTwoYear}}" stepKey="selectYear"/> |
| 60 | + <fillField selector="{{AuthorizenetConfigurationSection.verificationNumber}}" userInput="123" stepKey="fillVerificationNumber"/> |
| 61 | + <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="SubmitOrder"/> |
| 62 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 63 | + <!--Get order ID and open order page--> |
| 64 | + <see userinput="You created the order." stepKey="verifyOrderCreated"/> |
| 65 | + <grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId"/> |
| 66 | + <actionGroup ref="filterOrderGridById" stepKey="filterOrderGridById"> |
| 67 | + <argument name="orderId" value="$getOrderId"/> |
| 68 | + </actionGroup> |
| 69 | + <click selector="{{AdminDataGridTableSection.rowViewAction('1')}}" stepKey="clickCreatedOrderInGrid"/> |
| 70 | + <waitForPageLoad stepKey="waitForPageLoad2"/> |
| 71 | + <!--Verify required data--> |
| 72 | + <see userinput="Credit Card Direct Post (Authorize.net)" stepKey="checkPaymentMethod"/> |
| 73 | + <see userinput="Credit Card Type: MasterCard" stepKey="checkCardType"/> |
| 74 | + <see userinput="Credit Card Number: XXXX1111" stepKey="checkCardCode"/> |
| 75 | + <see userinput="AVS Response Code:" stepKey="checkAVSResponseCode"/> |
| 76 | + <see userinput="Processor Authentication Code:" stepKey="checkProcessorAuthorizationCode"/> |
| 77 | + <see userinput="Processor Response Text:" stepKey="checkProcessorResponseText"/> |
| 78 | + <see userinput="CVV2 Response Code:" stepKey="checkCVVResponseCode"/> |
| 79 | + <see userinput="The order was placed using USD." stepKey="checkCurrency"/> |
| 80 | + </test> |
| 81 | +</tests> |
0 commit comments