(app-desk) integrate static menu in the app

Integrate the menu from the mockup in the app.
This commit is contained in:
Anthony LC
2024-01-26 16:07:25 +01:00
committed by Anthony LC
parent cbe356214d
commit 66dbea3c6d
19 changed files with 337 additions and 30 deletions

View File

@@ -36,5 +36,12 @@ test.describe('Header', () => {
await expect(header.getByAltText('Cells icon')).toBeVisible();
await expect(header.getByAltText('Language Icon')).toBeVisible();
await expect(header.getByText('John Doe')).toBeVisible();
await expect(
header.getByRole('img', {
name: 'profile picture',
}),
).toBeVisible();
});
});

View File

@@ -0,0 +1,26 @@
import { expect, test } from "@playwright/test";
import { keyCloakSignIn } from "./common";
test.beforeEach(async ({ page }) => {
await page.goto("/");
await keyCloakSignIn(page);
});
test.describe("Menu", () => {
test("checks all the elements are visible", async ({ page }) => {
const menu = page.locator("menu").first();
await expect(menu.getByLabel("Search button")).toBeVisible();
await expect(menu.getByLabel("Favoris button")).toBeVisible();
await expect(menu.getByLabel("Recent button")).toBeVisible();
await expect(menu.getByLabel("Contacts button")).toBeVisible();
await expect(menu.getByLabel("Groups button")).toBeVisible();
await menu.getByLabel("Search button").hover();
await expect(menu.getByLabel("tooltip")).toHaveText("Search");
await menu.getByLabel("Contacts button").hover();
await expect(menu.getByLabel("tooltip")).toHaveText("Contacts");
});
});