|
| 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="AdminReportsAbandonedCartsSearchEmailWithPlusTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Reports"/> |
| 14 | + <stories value="Search in Grid"/> |
| 15 | + <title value="Admin Reports Abandoned Carts Search Email With Plus"/> |
| 16 | + <description value="Admin should be able to search for email that contains plus > Abandoned Carts"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-7465"/> |
| 19 | + <useCaseId value="ACP2E-1435"/> |
| 20 | + <group value="reports"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Create Category and Product --> |
| 24 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 25 | + <createData entity="_defaultProduct" stepKey="createProduct" /> |
| 26 | + |
| 27 | + <!-- Create Customers --> |
| 28 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"> |
| 29 | + <field key="email">John+Doe@example.com</field> |
| 30 | + </createData> |
| 31 | + <createData entity="Simple_US_Customer" stepKey="createCustomer2"> |
| 32 | + <field key="email">JohnDoe@example.com</field> |
| 33 | + </createData> |
| 34 | + |
| 35 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 36 | + </before> |
| 37 | + |
| 38 | + <after> |
| 39 | + <!-- Delete created Product, Category and Customers --> |
| 40 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 41 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 42 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 43 | + <deleteData createDataKey="createCustomer2" stepKey="deleteCustomer2"/> |
| 44 | + |
| 45 | + <!-- Reset filter on Abandoned Carts Report page --> |
| 46 | + <amOnPage url="{{AdminAbandonedCartsReportPage.url}}" stepKey="amOnAbandonedCartsReportPage"/> |
| 47 | + <click selector="{{AbandonedCartsReportMainSection.resetButton}}" stepKey="clickResetButton"/> |
| 48 | + |
| 49 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 50 | + </after> |
| 51 | + |
| 52 | + <!-- Login as a Customer on Storefront --> |
| 53 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomerToStorefront"> |
| 54 | + <argument name="Customer" value="$createCustomer$"/> |
| 55 | + </actionGroup> |
| 56 | + |
| 57 | + <!-- Open product and add product to cart of the first customer --> |
| 58 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory"> |
| 59 | + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> |
| 60 | + </actionGroup> |
| 61 | + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart"> |
| 62 | + <argument name="product" value="$createProduct$"/> |
| 63 | + <argument name="productCount" value="1"/> |
| 64 | + </actionGroup> |
| 65 | + |
| 66 | + <!-- Logout from customer account --> |
| 67 | + <actionGroup ref="CustomerLogoutStorefrontByMenuItemsActionGroup" stepKey="logoutFirstCustomer"/> |
| 68 | + |
| 69 | + <!-- Login as a second Customer on Storefront --> |
| 70 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomerToStorefront2"> |
| 71 | + <argument name="Customer" value="$createCustomer2$"/> |
| 72 | + </actionGroup> |
| 73 | + |
| 74 | + <!-- Open product and add product to cart of the first customer --> |
| 75 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory2"> |
| 76 | + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> |
| 77 | + </actionGroup> |
| 78 | + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart2"> |
| 79 | + <argument name="product" value="$createProduct$"/> |
| 80 | + <argument name="productCount" value="1"/> |
| 81 | + </actionGroup> |
| 82 | + |
| 83 | + <!-- Open Abandoned carts report in Admin --> |
| 84 | + <amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/> |
| 85 | + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToAbandonedCartsPage"> |
| 86 | + <argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/> |
| 87 | + <argument name="submenuUiId" value="{{AdminMenuReportsMarketingAbandonedCarts.dataUiId}}"/> |
| 88 | + </actionGroup> |
| 89 | + <actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle"> |
| 90 | + <argument name="title" value="{{AdminMenuReportsMarketingAbandonedCarts.pageTitle}}"/> |
| 91 | + </actionGroup> |
| 92 | + |
| 93 | + <!-- Search for email containing '+' sign --> |
| 94 | + <actionGroup ref="AdminAbandonedCartsReportFilterEmailActionGroup" stepKey="searchForEmailWithPlus"> |
| 95 | + <argument name="email" value="John+"/> |
| 96 | + </actionGroup> |
| 97 | + |
| 98 | + <!-- Check record is present --> |
| 99 | + <seeElement selector="{{AbandonedCartsGridSection.email('John+')}}" stepKey="seeCartInGrid"/> |
| 100 | + |
| 101 | + <!-- Check that only one record is present --> |
| 102 | + <actionGroup ref="AdminAssertNumberOfRecordsInAbandonedCartsReportActionGroup" stepKey="checkOnlyOneRecordIsFound"/> |
| 103 | + |
| 104 | + </test> |
| 105 | +</tests> |
0 commit comments