|
| 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="AdminLoginAsCustomerLoggingFilterTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Login as Customer logs"/> |
| 14 | + <stories value="Filter by date login as customer logs"/> |
| 15 | + <title value="Filter by date login as customer logs"/> |
| 16 | + <description value="Filter by date should be from/to"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <group value="login_as_customer"/> |
| 19 | + <testCaseId value="MC-38920"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 1" |
| 23 | + stepKey="enableLoginAsCustomer"/> |
| 24 | + <magentoCLI command="config:set {{LoginAsCustomerStoreViewLogin.path}} 0" |
| 25 | + stepKey="enableLoginAsCustomerAutoDetection"/> |
| 26 | + <createData entity="Simple_US_Customer_Assistance_Allowed" stepKey="createFirstCustomer"/> |
| 27 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsDefaultUser"/> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilterAfter"/> |
| 31 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsDefaultAdmin"/> |
| 32 | + <deleteData createDataKey="createFirstCustomer" stepKey="deleteFirstCustomer"/> |
| 33 | + <magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 0" |
| 34 | + stepKey="disableLoginAsCustomer"/> |
| 35 | + </after> |
| 36 | + <!-- Login into First Customer account --> |
| 37 | + <actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageActionGroup" |
| 38 | + stepKey="loginAsFirstCustomerByDefaultAdmin"> |
| 39 | + <argument name="customerId" value="$$createFirstCustomer.id$$"/> |
| 40 | + </actionGroup> |
| 41 | + <actionGroup ref="StorefrontSignOutAndCloseTabActionGroup" stepKey="signOutFirstCustomerDefaultAdmin"/> |
| 42 | + <!-- Navigate to Login as Customer Log page --> |
| 43 | + <actionGroup ref="AdminOpenLoginAsCustomerLogActionGroup" stepKey="gotoLoginAsCustomerLog"/> |
| 44 | + <!-- Setup date filters --> |
| 45 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> |
| 46 | + <actionGroup ref="AdminLoginAsCustomerLogFilterDatePickerTodayActionGroup" stepKey="filterByToday"/> |
| 47 | + <!-- Perform assertions --> |
| 48 | + <actionGroup ref="AdminAssertLoginAsCustomerLogRecordActionGroup" stepKey="verifyDefaultAdminFirstCustomerLogRecord"> |
| 49 | + <argument name="rowNumber" value="1"/> |
| 50 | + <argument name="adminId" value="1"/> |
| 51 | + <argument name="customerId" value="$$createFirstCustomer.id$$"/> |
| 52 | + </actionGroup> |
| 53 | + </test> |
| 54 | +</tests> |
0 commit comments