|
| 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="AdminLoginAsCustomerChangeAccountInformationTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Backend"/> |
| 14 | + <stories value="Edit Customer Account Information"/> |
| 15 | + <title value="Admin user login as customer and edit customer's first and last name"/> |
| 16 | + <description value="Verify Admin can access customer's personal cabinet and change his first and last name using Login as Customer functionality"/> |
| 17 | + <group value="login_as_customer"/> |
| 18 | + <severity value="MINOR"></severity> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 1" stepKey="enableLoginAsCustomer"/> |
| 22 | + <magentoCLI command="config:set {{LoginAsCustomerStoreViewLogin.path}} 0" stepKey="enableLoginAsCustomerAutoDetection"/> |
| 23 | + <magentoCLI command="cache:flush config" stepKey="flushCacheBeforeTestRun"/> |
| 24 | + <createData entity="Simple_US_Customer_Assistance_Allowed" stepKey="createCustomer"/> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAdmin"/> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/> |
| 29 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 30 | + <magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 0" stepKey="disableLoginAsCustomer"/> |
| 31 | + <magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestRun"/> |
| 32 | + </after> |
| 33 | + |
| 34 | + <actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageActionGroup" |
| 35 | + stepKey="loginAsCustomerFromCustomerPage"> |
| 36 | + <argument name="customerId" value="$$createCustomer.id$$"/> |
| 37 | + </actionGroup> |
| 38 | + <actionGroup ref="StorefrontCustomerChangeAccountInformationActionGroup" stepKey="editAccountInfo"> |
| 39 | + <argument name="firstName" value="{{UKCustomer.firstname}}"/> |
| 40 | + <argument name="lastName" value="{{UKCustomer.lastname}}"/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="AssertStorefrontCustomerMessagesActionGroup" stepKey="assertSuccessMessage"> |
| 43 | + <argument name="message" value="You saved the account information."/> |
| 44 | + </actionGroup> |
| 45 | + <actionGroup ref="AssertStorefrontCustomerAccountInformation" stepKey="assertAccountInformation"> |
| 46 | + <argument name="firstName" value="{{UKCustomer.firstname}}"/> |
| 47 | + <argument name="lastName" value="{{UKCustomer.lastname}}"/> |
| 48 | + <argument name="email" value="$createCustomer.email$"/> |
| 49 | + </actionGroup> |
| 50 | + </test> |
| 51 | +</tests> |
0 commit comments