mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
This reverts commit f3a94bdfa4
.
This commit is contained in:
@@ -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}"]`);
|
||||
|
||||
}
|
||||
|
@@ -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}"]`);
|
||||
|
||||
}
|
||||
|
@@ -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);
|
||||
});
|
||||
|
||||
});
|
||||
|
@@ -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 }) => {
|
||||
|
Reference in New Issue
Block a user