mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
ACS-8106: (a11y) Replace Material Tooltip with standard tooltip (#9894)
This commit is contained in:
@@ -16,4 +16,3 @@
|
||||
*/
|
||||
|
||||
export * from './error.component';
|
||||
export * from './validation.component';
|
||||
|
@@ -16,10 +16,7 @@
|
||||
*/
|
||||
|
||||
export const materialLocators = {
|
||||
Error: {
|
||||
root: 'mat-error'
|
||||
},
|
||||
Tooltip: {
|
||||
root: 'mat-tooltip-component'
|
||||
}
|
||||
Error: {
|
||||
root: 'mat-error'
|
||||
}
|
||||
};
|
||||
|
@@ -1,29 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Page } from '@playwright/test';
|
||||
import { BaseComponent } from '../base.component';
|
||||
import { materialLocators } from './material-locators';
|
||||
|
||||
export class TooltipComponent extends BaseComponent {
|
||||
private static rootElement = materialLocators.Tooltip.root;
|
||||
public content = this.getChild('div');
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, TooltipComponent.rootElement);
|
||||
}
|
||||
}
|
@@ -17,13 +17,11 @@
|
||||
|
||||
import { Page } from '@playwright/test';
|
||||
import { BaseComponent } from '../../page-object/components/base.component';
|
||||
import { ErrorComponent, TooltipComponent, ListboxComponent } from '../../page-object/components';
|
||||
import { ErrorComponent } from '../../page-object/components';
|
||||
|
||||
export class GroupComponent extends BaseComponent {
|
||||
private static rootElement = 'adf-cloud-group';
|
||||
public error = new ErrorComponent(this.page);
|
||||
public tooltip = new TooltipComponent(this.page);
|
||||
public listbox = new ListboxComponent(this.page);
|
||||
|
||||
public groupNaming = this.getChild('[data-automation-id="adf-cloud-group-chip-list"]');
|
||||
public groupInput = this.getChild('[data-automation-id="adf-group-cloud-search-input"]');
|
||||
@@ -33,5 +31,4 @@ export class GroupComponent extends BaseComponent {
|
||||
}
|
||||
|
||||
public getUserLocator = (userName: string) => this.getChild(`[data-automation-id="adf-cloud-group-chip-${userName}"]`);
|
||||
|
||||
}
|
||||
|
@@ -17,12 +17,11 @@
|
||||
|
||||
import { Page } from '@playwright/test';
|
||||
import { BaseComponent } from '../../page-object/components/base.component';
|
||||
import { ErrorComponent, TooltipComponent, ListboxComponent } from '../../page-object/components';
|
||||
import { ErrorComponent, ListboxComponent } from '../../page-object/components';
|
||||
|
||||
export class PeopleComponent extends BaseComponent {
|
||||
private static rootElement = 'adf-cloud-people';
|
||||
public error = new ErrorComponent(this.page);
|
||||
public tooltip = new TooltipComponent(this.page);
|
||||
public listbox = new ListboxComponent(this.page);
|
||||
|
||||
public usersNaming = this.getChild('[data-automation-id="adf-cloud-people-chip-list"]');
|
||||
@@ -33,5 +32,4 @@ export class PeopleComponent extends BaseComponent {
|
||||
}
|
||||
|
||||
public getUserLocator = (userName: string) => this.getChild(`[data-automation-id="adf-people-cloud-chip-${userName}"]`);
|
||||
|
||||
}
|
||||
|
@@ -39,9 +39,6 @@ test.describe('Groups component stories tests', () => {
|
||||
|
||||
await processServicesCloud.navigateTo({ moduleNames: ['group-cloud'], componentName: 'group-cloud', story: 'mandatory-preselected-groups' });
|
||||
await expect.soft(groupComponent.groupNaming).toContainText(expectedUsersName);
|
||||
|
||||
await groupComponent.getUserLocator('Meat Chicken').hover();
|
||||
await expect(groupComponent.tooltip.content).toContainText('Mandatory');
|
||||
});
|
||||
|
||||
test('Invalid Preselected Groups', async ({ processServicesCloud, groupComponent }) => {
|
||||
@@ -52,5 +49,4 @@ test.describe('Groups component stories tests', () => {
|
||||
|
||||
await expect(groupComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
|
||||
});
|
||||
|
||||
});
|
||||
|
@@ -42,7 +42,6 @@ test.describe('People component stories tests', () => {
|
||||
await peopleComponent.getUserLocator('Kielbasa Sausage').hover();
|
||||
|
||||
await expect.soft(peopleComponent.usersNaming).toContainText(expectedUsersName);
|
||||
await expect(peopleComponent.tooltip.content).toContainText('Mandatory');
|
||||
});
|
||||
|
||||
test('Invalid Preselected Users', async ({ processServicesCloud, peopleComponent }) => {
|
||||
|
Reference in New Issue
Block a user