(app-desk) design static Header

Design static Header, we will add the interactivity later.
This commit is contained in:
Anthony LC
2024-01-18 14:04:46 +01:00
committed by Anthony LC
parent 5b4fe1e77f
commit 5062cac623
17 changed files with 185 additions and 23 deletions

View File

@@ -7,9 +7,10 @@ test.beforeEach(async ({ page }) => {
await keyCloakSignIn(page);
});
test.describe('App', () => {
test('should display the homepage after keycloak login', async ({ page }) => {
await expect(page.locator('h2')).toContainText('Hello world!');
test.describe("App", () => {
test("should display the main elements", async ({ page }) => {
await expect(page.locator('header').first()).toContainText('Desk');
await expect(page.getByLabel('Team name')).toBeVisible();
});
test('creates 2 teams and displayed them', async ({ page }) => {

View File

@@ -0,0 +1,38 @@
import { expect, test } from "@playwright/test";
import { keyCloakSignIn } from "./common";
test.beforeEach(async ({ page }) => {
await page.goto("/");
await keyCloakSignIn(page);
});
test.describe("Header", () => {
test("checks all the elements are visible", async ({ page }) => {
const header = page.locator("header").first();
await expect(header.getByAltText("Marianne Logo")).toBeVisible();
await expect(
header.getByAltText("Freedom Equality Fraternity Logo"),
).toBeVisible();
await expect(header.getByAltText("Desk Logo")).toBeVisible();
await expect(header.locator("h2").getByText("Desk")).toHaveCSS(
"color",
"rgb(0, 0, 145)",
);
await expect(header.locator("h2").getByText("Desk")).toHaveCSS(
"font-family",
"marianne",
);
await expect(
header.getByRole("button", { name: "Access to FAQ" }),
).toBeVisible();
await expect(header.getByAltText("FAQ Icon")).toBeVisible();
await expect(header.getByText("FAQ")).toBeVisible();
await expect(header.getByAltText("Cells icon")).toBeVisible();
});
});