test: analogInputs.test.ts and dashboard.test.ts with import components
This commit is contained in:
@@ -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.907
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.908
|
||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||
|
||||
|
||||
@@ -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.907
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.908
|
||||
NEXT_PUBLIC_CPL_MODE=production
|
||||
@@ -1,3 +1,8 @@
|
||||
## [1.6.908] – 2025-09-11
|
||||
|
||||
- chore: only *.test.ts for pages and components test
|
||||
|
||||
---
|
||||
## [1.6.907] – 2025-09-11
|
||||
|
||||
- test: layout header, footer and sidebar
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.907",
|
||||
"version": "1.6.908",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.907",
|
||||
"version": "1.6.908",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.907",
|
||||
"version": "1.6.908",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3000",
|
||||
|
||||
@@ -4,11 +4,15 @@ 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();
|
||||
// Auf Footer-Bereich einschränken, damit Selektoren eindeutig bleiben
|
||||
const footer = page.getByRole("contentinfo");
|
||||
await expect(footer).toBeVisible();
|
||||
|
||||
await expect(footer.getByText(/Littwin Systemtechnik GmbH/)).toBeVisible();
|
||||
await expect(footer.getByText(/Telefon: 04402 972577/)).toBeVisible();
|
||||
await expect(
|
||||
page.getByText(/kontakt@littwin-systemtechnik\.de/)
|
||||
footer.getByText(/kontakt@littwin-systemtechnik\.de/)
|
||||
).toBeVisible();
|
||||
// Handbücher Button/Icon (Text oder Button reicht)
|
||||
await expect(page.getByText(/Handbücher/)).toBeVisible();
|
||||
// Exaktes Label im Footer, nicht die Überschrift "PDF Handbücher"
|
||||
await expect(footer.getByText("Handbücher", { exact: true })).toBeVisible();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { headerTest } from "@/playwright/tests/components/header/headerTest";
|
||||
import { navTest } from "@/playwright/tests/components/navigation/navTest";
|
||||
import { footerTest } from "@/playwright/tests/components/footer/footerTest";
|
||||
|
||||
test.use({
|
||||
viewport: {
|
||||
@@ -9,6 +12,11 @@ test.use({
|
||||
|
||||
test("test", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/analogInputs");
|
||||
// Gemeinsame Layout-Checks
|
||||
await headerTest(page);
|
||||
await navTest(page);
|
||||
await footerTest(page);
|
||||
// Seitenspezifische Checks
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Messwerteingänge" }).first()
|
||||
).toBeVisible();
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { headerTest } from "@/playwright/tests/components/header/headerTest";
|
||||
import { navTest } from "@/playwright/tests/components/navigation/navTest";
|
||||
import { footerTest } from "@/playwright/tests/components/footer/footerTest";
|
||||
|
||||
test.use({
|
||||
viewport: {
|
||||
@@ -9,6 +12,11 @@ test.use({
|
||||
|
||||
test("Dashboard", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/dashboard");
|
||||
// Gemeinsame Layout-Checks
|
||||
await headerTest(page);
|
||||
await navTest(page);
|
||||
await footerTest(page);
|
||||
// Seitenspezifische Checks
|
||||
await expect(page.getByRole("main").locator("svg").first()).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Letzten 20 Meldungen" })
|
||||
|
||||
Reference in New Issue
Block a user