|
11 | 11 | <test name="AdminChangeCustomerAssociatedWebsiteTest">
|
12 | 12 | <annotations>
|
13 | 13 | <features value="Customer"/>
|
14 |
| - <title value="Admin should not be able to change customer assigned website ID"/> |
15 |
| - <description value="Admin should not be able to change customer assigned website ID"/> |
| 14 | + <title value="Admin should be able to change customer associated website ID"/> |
| 15 | + <description value="Admin should be able to change customer associated website ID"/> |
16 | 16 | <severity value="AVERAGE"/>
|
17 | 17 | <useCaseId value="MC-38913"/>
|
18 | 18 | <testCaseId value="MC-39764"/>
|
19 | 19 | <stories value="Customer Edit"/>
|
20 | 20 | <group value="customer"/>
|
21 | 21 | </annotations>
|
22 |
| - |
23 | 22 | <before>
|
24 | 23 | <!--Login to admin-->
|
25 | 24 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
|
45 | 44 | <after>
|
46 | 45 | <!--Delete customer-->
|
47 | 46 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
|
48 |
| - <!--Reset customer grid filter--> |
49 |
| - <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomersPage"/> |
50 |
| - <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearCustomersGridFilter"/> |
51 | 47 | <!--Delete custom website-->
|
52 | 48 | <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
|
53 | 49 | <argument name="websiteName" value="{{NewWebSiteData.name}}"/>
|
54 | 50 | </actionGroup>
|
55 | 51 | <!--Logout from admin-->
|
56 | 52 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
|
57 | 53 | </after>
|
58 |
| - <!--Open customer grid--> |
59 |
| - <actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomersPage"/> |
60 |
| - <!--Filter customers grid by email--> |
61 |
| - <actionGroup ref="AdminFilterCustomerGridByEmail" stepKey="filterCustomer"> |
62 |
| - <argument name="email" value="$createCustomer.email$"/> |
63 |
| - </actionGroup> |
64 |
| - <!--Click on customer row to open inline editor--> |
65 |
| - <click selector="{{AdminDataGridTableSection.rowTemplate($createCustomer.email$)}}" stepKey="clickCustomersGridRow"/> |
66 |
| - <!--Wait for inline editor to open--> |
67 |
| - <waitForElementVisible selector="{{AdminCustomerGridInlineEditorSection.customerEmailEditor}}" stepKey="waitForEditor"/> |
68 |
| - <!--Assert that website is not editable--> |
69 |
| - <dontSeeElement selector="{{AdminCustomerGridInlineEditorSection.customerWebsiteEditor}}" stepKey="dontSeeWebsiteEditor"/> |
70 |
| - <!--Assert that "Main Website" is displayed in website cell--> |
71 |
| - <see selector="{{AdminCustomerGridInlineEditorSection.cellContent('Web Site')}}" userInput="{{_defaultWebsite.name}}" stepKey="assertThatMainWebsiteIsDisplayedInWebsiteCell"/> |
72 | 54 | <!--Open customer edit page-->
|
73 | 55 | <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage">
|
74 | 56 | <argument name="customerId" value="$createCustomer.id$"/>
|
75 | 57 | </actionGroup>
|
76 | 58 | <!--Navigate to "Account Information" tab-->
|
77 | 59 | <actionGroup ref="AdminOpenAccountInformationTabFromCustomerEditPageActionGroup" stepKey="openAccountInformationEditPage"/>
|
78 |
| - <!--Assert that "Main Website" is selected in website selector--> |
| 60 | + <!--Verify that "Main Website" is selected in website selector--> |
79 | 61 | <seeOptionIsSelected selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{_defaultWebsite.name}}" stepKey="assertThatMainWebsiteIsSelected"/>
|
80 |
| - <!--Assert that website selector is disabled--> |
81 |
| - <assertElementContainsAttribute stepKey="assertThatWebsiteSelectorIsDisabled"> |
82 |
| - <expectedResult selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" attribute="disabled" type="string"/> |
83 |
| - </assertElementContainsAttribute> |
| 62 | + <!--Change customer website to "Second Website"--> |
| 63 | + <actionGroup ref="AdminUpdateCustomerWebsiteInCustomerInformationPageActionGroup" stepKey="updateCustomerWebsite"> |
| 64 | + <argument name="websiteName" value="{{NewWebSiteData.name}}"/> |
| 65 | + </actionGroup> |
| 66 | + <!--Verify that changes are saved successfully--> |
| 67 | + <actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="assertThatChangesAreSavedSuccessfully"/> |
| 68 | + <!--Open customer edit page--> |
| 69 | + <actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage2"> |
| 70 | + <argument name="customerId" value="$createCustomer.id$"/> |
| 71 | + </actionGroup> |
| 72 | + <!--Navigate to "Account Information" tab--> |
| 73 | + <actionGroup ref="AdminOpenAccountInformationTabFromCustomerEditPageActionGroup" stepKey="openAccountInformationEditPage2"/> |
| 74 | + <!--Verify that "Second Website" is selected in website selector--> |
| 75 | + <seeOptionIsSelected selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{NewWebSiteData.name}}" stepKey="assertThatSecondWebsiteIsSelected"/> |
84 | 76 | </test>
|
85 | 77 | </tests>
|
0 commit comments