🚸(app-desk) cannot select user or email already selected
- Add the teamid to the useUsers query, to not get the users that are already in the team - Add a check to not select a user or email that is already selected
This commit is contained in:
@@ -176,14 +176,9 @@ test.describe('Members Create', () => {
|
||||
await page.getByLabel('Add members to the team').click();
|
||||
|
||||
await inputSearch.fill('test');
|
||||
await page.getByRole('option', { name: users[0].name }).click();
|
||||
await page.getByRole('radio', { name: 'Owner' }).click();
|
||||
|
||||
await page.getByRole('button', { name: 'Validate' }).click();
|
||||
|
||||
await expect(
|
||||
page.getByText(`Failed to add ${users[0].name} in the team`),
|
||||
).toBeVisible();
|
||||
page.getByRole('option', { name: users[0].name }),
|
||||
).toBeHidden();
|
||||
});
|
||||
|
||||
test('it try to add twice the same invitation', async ({
|
||||
@@ -218,12 +213,6 @@ test.describe('Members Create', () => {
|
||||
await page.getByLabel('Add members to the team').click();
|
||||
|
||||
await inputSearch.fill(email);
|
||||
await page.getByRole('option', { name: email }).click();
|
||||
|
||||
await page.getByRole('button', { name: 'Validate' }).click();
|
||||
|
||||
await expect(
|
||||
page.getByText(`Failed to create the invitation for ${email}`),
|
||||
).toBeVisible();
|
||||
await expect(page.getByRole('option', { name: email })).toBeHidden();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user