(e2e) fix job flakinness

Fix a flaky jobs
- searched username could be hidden in the options
 depends the dummy data generated.
- remove first place assertion when create a new team,
  multiple workers make this assertion flaky
This commit is contained in:
Anthony LC
2024-04-04 09:54:52 +02:00
committed by Anthony LC
parent e20960e3e1
commit 3ddc519d9e
2 changed files with 2 additions and 4 deletions

View File

@@ -39,9 +39,7 @@ export const createTeam = async (
await page.getByText('Team name').fill(randomTeams[i]);
await expect(buttonCreate).toBeEnabled();
await buttonCreate.click();
await expect(
panel.locator('li').nth(0).getByText(randomTeams[i]),
).toBeVisible();
await expect(panel.locator('li').getByText(randomTeams[i])).toBeVisible();
}
return randomTeams;

View File

@@ -49,7 +49,7 @@ test.describe('Members Create', () => {
await page.getByRole('option', { name: users[0].name }).click();
// Select user 2
await inputSearch.fill('test1');
await inputSearch.fill('test');
await page.getByRole('option', { name: users[1].name }).click();
// Select email