|
| 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="AdminLoginAsCustomerAssistanceCheckboxTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Login as Customer"/> |
| 14 | + <stories value="Opt in/out"/> |
| 15 | + <title value="Login as Customer assistance checkbox test"/> |
| 16 | + <description |
| 17 | + value="Verify that 'Allow remote shopping assistance' checkbox is present on Edit Account Information page"/> |
| 18 | + <severity value="CRITICAL"/> |
| 19 | + <group value="login_as_customer"/> |
| 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 | + <createData entity="Simple_US_Customer" stepKey="createSecondCustomer"/> |
| 28 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsDefaultUser"/> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <deleteData createDataKey="createFirstCustomer" stepKey="deleteFirstCustomer"/> |
| 32 | + <deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/> |
| 33 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAfter"/> |
| 34 | + </after> |
| 35 | + <!-- Login into First Customer account --> |
| 36 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsFirstCustomer"> |
| 37 | + <argument name="Customer" value="$createFirstCustomer$"/> |
| 38 | + </actionGroup> |
| 39 | + |
| 40 | + <!-- Open My Account > Order by SKU --> |
| 41 | + <actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToFirstMyAccountPage"/> |
| 42 | + <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="openFirstAccountInformation"> |
| 43 | + <argument name="menu" value="Account Information"/> |
| 44 | + </actionGroup> |
| 45 | + |
| 46 | + <!-- Assert Assistance checkbox is present and checked --> |
| 47 | + <actionGroup ref="StorefrontAssertLoginAssistanceAllowedCheckboxCheckedActionGroup" |
| 48 | + stepKey="assertAssistanceAllowedCheckboxChecked"/> |
| 49 | + |
| 50 | + <!-- Logout customer --> |
| 51 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutFirstCustomer"/> |
| 52 | + |
| 53 | + <!-- Login into Second Customer account --> |
| 54 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsSecondCustomer"> |
| 55 | + <argument name="Customer" value="$createSecondCustomer$"/> |
| 56 | + </actionGroup> |
| 57 | + |
| 58 | + <!-- Open My Account > Order by SKU --> |
| 59 | + <actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToSecondMyAccountPage"/> |
| 60 | + <actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="openSecondAccountInformation"> |
| 61 | + <argument name="menu" value="Account Information"/> |
| 62 | + </actionGroup> |
| 63 | + |
| 64 | + <!-- Assert Assistance checkbox is present and unchecked --> |
| 65 | + <actionGroup ref="StorefrontAssertLoginAssistanceAllowedCheckboxUncheckedActionGroup" |
| 66 | + stepKey="assertAssistanceAllowedCheckboxUnchecked"/> |
| 67 | + </test> |
| 68 | +</tests> |
0 commit comments