test: layout header, footer and sidebar

This commit is contained in:
ISA
2025-09-11 08:38:00 +02:00
parent 2ceebea533
commit 7fe04f55fe
8 changed files with 65 additions and 5 deletions

View File

@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
NEXT_PUBLIC_EXPORT_STATIC=false
NEXT_PUBLIC_USE_CGI=false
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.6.905
NEXT_PUBLIC_APP_VERSION=1.6.906
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)

View File

@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
NEXT_PUBLIC_EXPORT_STATIC=true
NEXT_PUBLIC_USE_CGI=true
# App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.6.905
NEXT_PUBLIC_APP_VERSION=1.6.906
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,8 @@
## [1.6.906] 2025-09-11
- fix: logo und tests WIP
---
## [1.6.905] 2025-09-11
- style: header, navigation und _app.tsx

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cpl-v4",
"version": "1.6.905",
"version": "1.6.906",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cpl-v4",
"version": "1.6.905",
"version": "1.6.906",
"dependencies": {
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",

View File

@@ -1,6 +1,6 @@
{
"name": "cpl-v4",
"version": "1.6.905",
"version": "1.6.906",
"private": true,
"scripts": {
"dev": "next dev -p 3000",

View File

@@ -0,0 +1,14 @@
import { Page, expect } from "@playwright/test";
/**
* Footer assertions.
*/
export async function footerTest(page: Page) {
await expect(page.getByText(/Littwin Systemtechnik GmbH/)).toBeVisible();
await expect(page.getByText(/Telefon: 04402 972577/)).toBeVisible();
await expect(
page.getByText(/kontakt@littwin-systemtechnik\.de/)
).toBeVisible();
// Handbücher Button/Icon (Text oder Button reicht)
await expect(page.getByText(/Handbücher/)).toBeVisible();
}

View File

@@ -0,0 +1,21 @@
import { Page, expect } from "@playwright/test";
/**
* Reusable header assertions.
* Add more checks here if the header grows (logout button, admin badge etc.).
*/
export async function headerTest(page: Page) {
// Haupttitel
await expect(
page.getByRole("heading", { name: "Meldestation" })
).toBeVisible();
// Logo (alt="Logo")
await expect(
page.getByRole("img", { name: "Logo", exact: true })
).toBeVisible();
// Talas Logo
await expect(page.getByRole("img", { name: "TALAS Logo" })).toBeVisible();
// Theme Toggle (Label wechselt Dark/Light). Wir akzeptieren beide.
const darkBtn = page.getByRole("button", { name: /Dark Mode|Light Mode/ });
await expect(darkBtn).toBeVisible();
}

View File

@@ -0,0 +1,20 @@
import { Page, expect } from "@playwright/test";
/**
* Sidebar / Navigation visibility + core links.
*/
export async function navTest(page: Page) {
const links = [
"Übersicht",
"Kabelüberwachung",
"Meldungseingänge",
"Schaltausgänge",
"Messwerteingänge",
"Berichte",
"System",
"Einstellungen",
];
for (const name of links) {
await expect(page.getByRole("link", { name })).toBeVisible();
}
}