Revert "ACS-8106: (a11y) Replace Material Tooltip with standard tooltip (#9894)" (#9905)

This reverts commit f3a94bdfa4.
This commit is contained in:
Pablo Martinez
2024-07-03 14:08:21 +02:00
committed by GitHub
parent e457dd3a78
commit 41c3667906
96 changed files with 561 additions and 254 deletions

View File

@@ -16,3 +16,4 @@
*/
export * from './error.component';
export * from './validation.component';

View File

@@ -16,7 +16,10 @@
*/
export const materialLocators = {
Error: {
root: 'mat-error'
}
Error: {
root: 'mat-error'
},
Tooltip: {
root: 'mat-tooltip-component'
}
};

View File

@@ -0,0 +1,29 @@
/*!
* @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);
}
}

View File

@@ -17,11 +17,13 @@
import { Page } from '@playwright/test';
import { BaseComponent } from '../../page-object/components/base.component';
import { ErrorComponent } from '../../page-object/components';
import { ErrorComponent, TooltipComponent, ListboxComponent } 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"]');
@@ -31,4 +33,5 @@ export class GroupComponent extends BaseComponent {
}
public getUserLocator = (userName: string) => this.getChild(`[data-automation-id="adf-cloud-group-chip-${userName}"]`);
}

View File

@@ -17,11 +17,12 @@
import { Page } from '@playwright/test';
import { BaseComponent } from '../../page-object/components/base.component';
import { ErrorComponent, ListboxComponent } from '../../page-object/components';
import { ErrorComponent, TooltipComponent, 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"]');
@@ -32,4 +33,5 @@ export class PeopleComponent extends BaseComponent {
}
public getUserLocator = (userName: string) => this.getChild(`[data-automation-id="adf-people-cloud-chip-${userName}"]`);
}

View File

@@ -39,6 +39,9 @@ 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 }) => {
@@ -49,4 +52,5 @@ test.describe('Groups component stories tests', () => {
await expect(groupComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
});
});

View File

@@ -42,6 +42,7 @@ 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 }) => {