|
31 | 31 | <createData entity="SimpleProduct2" stepKey="createProduct1"/> |
32 | 32 | <createData entity="SimpleProduct2" stepKey="createProduct2"/> |
33 | 33 | <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/> |
34 | | - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 34 | + <!-- Create new User --> |
| 35 | + <actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/> |
| 36 | + <actionGroup ref="AdminCreateUserWithRoleActionGroup" stepKey="createAdminUser"> |
| 37 | + <argument name="user" value="activeAdmin"/> |
| 38 | + <argument name="role" value="roleDefaultAdministrator"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutMasterAdmin"/> |
| 41 | + |
| 42 | + <!-- Login as new User --> |
| 43 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToNewAdmin"> |
| 44 | + <argument name="username" value="{{activeAdmin.username}}"/> |
| 45 | + <argument name="password" value="{{activeAdmin.password}}"/> |
| 46 | + </actionGroup> |
| 47 | + |
| 48 | + <!--Go to All Customers Page to open the customer--> |
| 49 | + <amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToAllCustomersPage2"/> |
| 50 | + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="OpenEditCustomerFrom2"> |
| 51 | + <argument name="customer" value="$$createCustomer$$"/> |
| 52 | + </actionGroup> |
| 53 | + <actionGroup ref="AdminOpenAccountInformationTabFromCustomerEditPageAllowAssistanceActionGroup" stepKey="clickOnAllowAssistanceConfig2"/> |
| 54 | + <!--Verify that changes are saved successfully--> |
| 55 | + <actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="assertThatChangesAreSavedSuccessfully2"/> |
35 | 56 | </before> |
36 | 57 |
|
37 | 58 | <after> |
|
40 | 61 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" /> |
41 | 62 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
42 | 63 | <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearAllOrdersGridFilters"/> |
| 64 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 65 | + |
| 66 | + <!-- Delete new User --> |
| 67 | + <actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/> |
| 68 | + <actionGroup ref="AdminDeleteUserActionGroup" stepKey="deleteUser"> |
| 69 | + <argument name="user" value="activeAdmin"/> |
| 70 | + </actionGroup> |
43 | 71 | <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> |
44 | 72 | <actionGroup ref="CliDisableFreeShippingMethodActionGroup" stepKey="disableFreeShipping"/> |
45 | 73 | <comment userInput="Adding the comment to replace 'cache:flush' command for preserving Backward Compatibility" stepKey="flushCacheAfterTestRun"/> |
46 | 74 | </after> |
47 | 75 |
|
48 | | - <!--Go to All Customers Page to open the customer--> |
49 | | - <amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToAllCustomersPage2"/> |
50 | | - <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="OpenEditCustomerFrom2"> |
51 | | - <argument name="customer" value="$$createCustomer$$"/> |
52 | | - </actionGroup> |
53 | | - <actionGroup ref="AdminOpenAccountInformationTabFromCustomerEditPageAllowAssistanceActionGroup" stepKey="clickOnAllowAssistanceConfig2"/> |
54 | | - <!--Verify that changes are saved successfully--> |
55 | | - <actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="assertThatChangesAreSavedSuccessfully2"/> |
56 | 76 | <!-- Login as Customer from Customer page --> |
57 | 77 | <actionGroup ref="AdminLoginAsCustomerLoginFromCustomerPageActionGroup" |
58 | 78 | stepKey="loginAsCustomerFromCustomerPage"> |
|
107 | 127 | <!-- Assert Admin Order page contains message about Order created by a Store Administrator --> |
108 | 128 | <actionGroup ref="AdminAssertContainsMessageOrderCreatedByAdminActionGroup" stepKey="verifyAdminMessageFirstOrder"> |
109 | 129 | <argument name="orderId" value="{$grabFirstOrderId}"/> |
110 | | - <argument name="adminUserFullName" value="Magento User"/> |
| 130 | + <argument name="adminUserFullName" value="{{activeAdmin.firstname}} {{activeAdmin.lastname}}"/> |
111 | 131 | </actionGroup> |
112 | 132 | <actionGroup ref="AdminAssertContainsMessageOrderCreatedByAdminActionGroup" stepKey="verifyAdminMessageSecondOrder"> |
113 | 133 | <argument name="orderId" value="{$grabSecondOrderId}"/> |
114 | | - <argument name="adminUserFullName" value="Magento User"/> |
| 134 | + <argument name="adminUserFullName" value="{{activeAdmin.firstname}} {{activeAdmin.lastname}}"/> |
115 | 135 | </actionGroup> |
116 | 136 | </test> |
117 | 137 | </tests> |
0 commit comments