|
| 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="AdminLoginAsCustomerEditCustomersAddressTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Login As Customer"/> |
| 14 | + <stories value="Edit Customer addresses"/> |
| 15 | + <title value="Admin user login as customer and edit customer's address"/> |
| 16 | + <description |
| 17 | + value="Verify Admin can access customer's personal cabinet and change his default shipping and billing addresses using Login As Customer functionality"/> |
| 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="cache:flush config" stepKey="flushCacheBeforeTestRun"/> |
| 25 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 26 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAdmin"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <actionGroup ref="logout" stepKey="logoutAdmin"/> |
| 30 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 31 | + <magentoCLI command="config:set {{LoginAsCustomerConfigDataEnabled.path}} 0" |
| 32 | + stepKey="disableLoginAsCustomer"/> |
| 33 | + <magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestRun"/> |
| 34 | + </after> |
| 35 | + |
| 36 | + <!-- Login As Customer Login from Customer page --> |
| 37 | + <actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageActionGroup" |
| 38 | + stepKey="loginAsCustomerFromCustomerPage"> |
| 39 | + <argument name="customerId" value="$$createCustomer.id$$"/> |
| 40 | + </actionGroup> |
| 41 | + |
| 42 | + <!-- Add new default address --> |
| 43 | + <actionGroup ref="StorefrontAddCustomerDefaultAddressActionGroup" stepKey="addNewDefaultAddress"> |
| 44 | + <argument name="Address" value="US_Address_CA"/> |
| 45 | + </actionGroup> |
| 46 | + |
| 47 | + <!-- Open Customer edit page --> |
| 48 | + <actionGroup ref="StorefrontSignOutAndCloseTabActionGroup" stepKey="signOutAfterLoggedInAsCustomer"/> |
| 49 | + <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage"> |
| 50 | + <argument name="customerId" value="$createCustomer.id$"/> |
| 51 | + </actionGroup> |
| 52 | + |
| 53 | + <!-- Assert Customer Default Billing Address --> |
| 54 | + <actionGroup stepKey="checkDefaultBilling" ref="AdminAssertCustomerDefaultBillingAddress"> |
| 55 | + <argument name="firstName" value="$$createCustomer.firstname$$"/> |
| 56 | + <argument name="lastName" value="$$createCustomer.lastname$$"/> |
| 57 | + <argument name="street1" value="{{US_Address_CA.street[0]}}"/> |
| 58 | + <argument name="state" value="{{US_Address_CA.state}}"/> |
| 59 | + <argument name="postcode" value="{{US_Address_CA.postcode}}"/> |
| 60 | + <argument name="country" value="{{US_Address_CA.country}}"/> |
| 61 | + <argument name="telephone" value="{{US_Address_CA.telephone}}"/> |
| 62 | + </actionGroup> |
| 63 | + |
| 64 | + <!-- Assert Customer Default Shipping Address --> |
| 65 | + <actionGroup stepKey="checkDefaultShipping" ref="AdminAssertCustomerDefaultShippingAddress"> |
| 66 | + <argument name="firstName" value="$$createCustomer.firstname$$"/> |
| 67 | + <argument name="lastName" value="$$createCustomer.lastname$$"/> |
| 68 | + <argument name="street1" value="{{US_Address_CA.street[0]}}"/> |
| 69 | + <argument name="state" value="{{US_Address_CA.state}}"/> |
| 70 | + <argument name="postcode" value="{{US_Address_CA.postcode}}"/> |
| 71 | + <argument name="country" value="{{US_Address_CA.country}}"/> |
| 72 | + <argument name="telephone" value="{{US_Address_CA.telephone}}"/> |
| 73 | + </actionGroup> |
| 74 | + </test> |
| 75 | +</tests> |
0 commit comments