Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAE-22417 Fix storybook e2es #9649

Merged
merged 1 commit into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test.describe('People component stories tests', () => {

await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'valid-preselected-users' });

expect(peopleComponent.usersNaming).toContainText(expectedUsersName);
await expect(peopleComponent.usersNaming).toContainText(expectedUsersName);
});

test('Mandatory Preselected Users', async ({ processServicesCloud, peopleComponent }) => {
Expand All @@ -41,8 +41,8 @@ test.describe('People component stories tests', () => {
await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'mandatory-preselected-users' });
await peopleComponent.getUserLocator('Kielbasa Sausage').hover();

expect.soft(peopleComponent.usersNaming).toContainText(expectedUsersName);
expect(peopleComponent.tooltip.content).toContainText('Mandatory');
await expect.soft(peopleComponent.usersNaming).toContainText(expectedUsersName);
await expect(peopleComponent.tooltip.content).toContainText('Mandatory');
});

test('Invalid Preselected Users', async ({ processServicesCloud, peopleComponent }) => {
Expand All @@ -51,7 +51,7 @@ test.describe('People component stories tests', () => {

await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'invalid-preselected-users' });

expect(peopleComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
await expect(peopleComponent.error.content).toContainText(expectedWarningIcon + expectedWarningMessage);
});

test('Excluded Users', async ({ processServicesCloud, peopleComponent }) => {
Expand All @@ -63,7 +63,7 @@ test.describe('People component stories tests', () => {
await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'excluded-users' });
await peopleComponent.usersInput.type('user');

expect(peopleComponent.listbox.allOptions).not.toContainText(expectedExcludedUsers);
await expect(peopleComponent.listbox.allOptions).not.toContainText(expectedExcludedUsers);
});

test('No Users', async ({ processServicesCloud, peopleComponent }) => {
Expand All @@ -72,6 +72,6 @@ test.describe('People component stories tests', () => {
await processServicesCloud.navigateTo({ moduleNames: ['people-cloud'], componentName: 'people-cloud', story: 'no-users' });
await peopleComponent.usersInput.type('user');

expect(peopleComponent.listbox.oneOption).toContainText(expectedInformation);
await expect(peopleComponent.listbox.oneOption).toContainText(expectedInformation);
});
});
Loading