Skip to content

Commit

Permalink
AAE-22417 Fix storybook e2es (#9649)
Browse files Browse the repository at this point in the history
  • Loading branch information
annkarwatka committed May 6, 2024
1 parent 6f0bbe4 commit 42bb632
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions e2e-playwright/process-services-cloud/specs/people-cloud.e2e.ts
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);
});
});

0 comments on commit 42bb632

Please sign in to comment.