(app-desk) add modal for adding members to a team

Create the button to open the modal.
Add a modal for adding members to a team.
This modal will open thanks to a dedicated page.
This commit is contained in:
Anthony LC
2024-03-18 11:36:48 +01:00
committed by Anthony LC
parent 4a141736ff
commit 2f8801f7eb
6 changed files with 148 additions and 66 deletions

View File

@@ -0,0 +1,23 @@
import { expect, test } from '@playwright/test';
import { createTeam, keyCloakSignIn } from './common';
test.beforeEach(async ({ page, browserName }) => {
await page.goto('/');
await keyCloakSignIn(page, browserName);
});
test.describe('Members Create', () => {
test('it opens the modals to add a member to the team', async ({
page,
browserName,
}) => {
await createTeam(page, 'member-open-modal', browserName, 1);
await page.getByLabel('Add members to the team').click();
await expect(page.getByText('Add members to the team')).toBeVisible();
await expect(page.getByRole('button', { name: 'Validate' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Cancel' })).toBeVisible();
});
});