mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
* [AAE-10252] Storybook Update existing Stories to adhere to conventions * Added expaned controls globally * About Module, Comments Module * Icon Module, Language Menu Module * Social Module * Naming of single stories * process-services-cloud Modules * Added descriptions and categories for actions * Fixed and cleaned error-content stories * Updated playwright tests to navigate properly * Template Module * Toolbar Module * fixed Like component controls * content projection showcase
48 lines
2.0 KiB
TypeScript
48 lines
2.0 KiB
TypeScript
/*
|
|
* Copyright © 2005 - 2021 Alfresco Software, Ltd. All rights reserved.
|
|
*
|
|
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
|
* pursuant to a written agreement and any use of this program without such an
|
|
* agreement is prohibited.
|
|
*/
|
|
|
|
import { test, expect } from '../fixtures/page-initialization';
|
|
|
|
test.describe.configure({ mode: 'parallel' });
|
|
|
|
test.describe('Groups component stories tests', () => {
|
|
test('Valid Preselected Groups', async ({ processServicesCloud, groupComponent }) => {
|
|
const expectedUsersName = `
|
|
Vegetable Aubergine cancel
|
|
Meat Chicken cancel
|
|
`;
|
|
|
|
await processServicesCloud.navigateTo({moduleNames:['group-cloud'], componentName: 'group-cloud', story: 'valid-preselected-groups' });
|
|
|
|
await expect(groupComponent.groupNaming).toContainText(expectedUsersName);
|
|
});
|
|
|
|
test('Mandatory Preselected Groups', async ({ processServicesCloud, groupComponent }) => {
|
|
const expectedUsersName = `
|
|
Vegetable Aubergine cancel
|
|
Meat Chicken
|
|
`;
|
|
|
|
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 }) => {
|
|
const expectedWarningMessage = 'No group found with the name Invalid Group';
|
|
const expectedWarningIcon = 'error_outline';
|
|
|
|
await processServicesCloud.navigateTo({moduleNames:['group-cloud'], componentName: 'group-cloud', story: 'invalid-preselected-groups' });
|
|
|
|
await expect(groupComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
|
|
});
|
|
|
|
});
|