🚑️(teams) hide display add button when disallowed

The frontend should not display "add team" actions when the
user has not the ability.
This commit is contained in:
Quentin BEY
2025-01-30 15:59:58 +01:00
committed by BEY Quentin
parent 4df4172151
commit 92753082c7
4 changed files with 53 additions and 18 deletions

View File

@@ -39,9 +39,18 @@ test.describe('Config', () => {
await page.goto('/');
await keyCloakSignIn(page, browserName, 'mail-member');
await expect(page.locator('menu')).toBeHidden();
await page
.locator('menu')
.first()
.getByLabel(`Mail Domains button`)
.click();
await expect(page).toHaveURL(/mail-domains\//);
await expect(page.getByText('Mail Domains')).toBeVisible();
await expect(
page
.getByLabel('Mail domains panel', { exact: true })
.getByText('Mail Domains'),
).toBeVisible();
});
test('it checks that the user abilities display teams', async ({