✨(app-desk) add team info component
Add the team info component to the team page. This component shows some informations about the team: - name - amount of members - date created - date updated
This commit is contained in:
39
src/frontend/apps/e2e/__tests__/app-desk/team.spec.ts
Normal file
39
src/frontend/apps/e2e/__tests__/app-desk/team.spec.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
import { keyCloakSignIn } from './common';
|
||||
|
||||
test.beforeEach(async ({ page, browserName }) => {
|
||||
await page.goto('/');
|
||||
await keyCloakSignIn(page, browserName);
|
||||
});
|
||||
|
||||
test.describe('Team', () => {
|
||||
test('checks all the top box elements are visible', async ({
|
||||
page,
|
||||
browserName,
|
||||
}) => {
|
||||
const panel = page.getByLabel('Teams panel').first();
|
||||
|
||||
await panel.getByRole('button', { name: 'Add a team' }).click();
|
||||
|
||||
const teamName = `My new team ${browserName}-${Math.floor(Math.random() * 1000)}`;
|
||||
await page.getByText('Team name').fill(teamName);
|
||||
await page.getByRole('button', { name: 'Create the team' }).click();
|
||||
|
||||
await expect(page.getByLabel('icon group')).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('heading', {
|
||||
name: `Members of “${teamName}“`,
|
||||
level: 3,
|
||||
}),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText(`Add people to the “${teamName}“ group.`),
|
||||
).toBeVisible();
|
||||
|
||||
await expect(page.getByText(`1 member`)).toBeVisible();
|
||||
|
||||
await expect(page.getByText(`Created at 06/02/2024`)).toBeVisible();
|
||||
await expect(page.getByText(`Last update at 07/02/2024`)).toBeVisible();
|
||||
});
|
||||
});
|
||||
@@ -7,7 +7,7 @@ test.beforeEach(async ({ page, browserName }) => {
|
||||
await keyCloakSignIn(page, browserName);
|
||||
});
|
||||
|
||||
test.describe('Teams', () => {
|
||||
test.describe('Teams Create', () => {
|
||||
test('checks all the create team elements are visible', async ({ page }) => {
|
||||
const buttonCreateHomepage = page.getByRole('button', {
|
||||
name: 'Create a new team',
|
||||
@@ -71,7 +71,7 @@ test.describe('Teams', () => {
|
||||
await page.getByText('Team name').fill(teamName);
|
||||
await page.getByRole('button', { name: 'Create the team' }).click();
|
||||
|
||||
const elTeam = page.getByText(`Teams: ${teamName}`);
|
||||
const elTeam = page.getByText(`Members of “${teamName}“`);
|
||||
await expect(elTeam).toBeVisible();
|
||||
|
||||
await panel.getByRole('button', { name: 'Add a team' }).click();
|
||||
|
||||
Reference in New Issue
Block a user