chore: only *.test.ts for pages and components test

This commit is contained in:
ISA
2025-09-11 08:44:15 +02:00
parent 7fe04f55fe
commit 7f035f0c18
7 changed files with 10 additions and 179 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.906
NEXT_PUBLIC_APP_VERSION=1.6.907
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.906
NEXT_PUBLIC_APP_VERSION=1.6.907
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,8 @@
## [1.6.907] 2025-09-11
- test: layout header, footer and sidebar
---
## [1.6.906] 2025-09-11
- fix: logo und tests WIP

4
package-lock.json generated
View File

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

View File

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

View File

@@ -1,68 +0,0 @@
import { test, expect } from "@playwright/test";
test.use({
viewport: {
height: 900,
width: 1600,
},
});
test("test", async ({ page }) => {
await page.goto("http://localhost:3000/dashboard");
await page.getByRole("img", { name: "Logo", exact: true }).click();
await page.getByRole("img", { name: "TALAS Logo" }).click();
await page.getByRole("heading", { name: "Meldestation" }).click();
await page.getByText("CPLV4 Ismail Rastede").click();
await expect(page.getByRole("button", { name: "Dark Mode" })).toBeVisible();
await expect(page.getByRole("link", { name: "Übersicht" })).toBeVisible();
await expect(
page.getByRole("link", { name: "Kabelüberwachung" })
).toBeVisible();
await expect(
page.getByRole("link", { name: "Meldungseingänge" })
).toBeVisible();
await expect(
page.getByRole("link", { name: "Schaltausgänge" })
).toBeVisible();
await expect(
page.getByRole("link", { name: "Messwerteingänge" })
).toBeVisible();
await expect(page.getByRole("link", { name: "Berichte" })).toBeVisible();
await expect(page.getByRole("link", { name: "System" })).toBeVisible();
await expect(page.getByRole("link", { name: "Einstellungen" })).toBeVisible();
await expect(
page
.locator("div")
.filter({ hasText: /^Littwin Systemtechnik GmbH & Co\. KG$/ })
.locator("path")
).toBeVisible();
await expect(page.getByText("Littwin Systemtechnik GmbH &")).toBeVisible();
await expect(
page
.locator("div")
.filter({ hasText: /^Telefon: 04402 972577-0$/ })
.locator("path")
).toBeVisible();
await expect(page.getByText("Telefon: 04402 972577-")).toBeVisible();
await expect(
page
.locator("div")
.filter({ hasText: /^kontakt@littwin-systemtechnik\.de$/ })
.locator("path")
).toBeVisible();
await expect(page.getByText("kontakt@littwin-systemtechnik")).toBeVisible();
await expect(
page
.locator("div")
.filter({ hasText: /^Handbücher$/ })
.locator("svg")
).toBeVisible();
await expect(page.getByText("Handbücher", { exact: true })).toBeVisible();
await page.getByText("Handbücher", { exact: true }).click();
await expect(
page.getByRole("heading", { name: "PDF Handbücher" })
).toBeVisible();
await expect(page.getByText("KUE705FO.PDF")).toBeVisible();
await expect(page.getByRole("button", { name: "Schließen" })).toBeVisible();
await page.getByRole("button", { name: "Schließen" }).click();
});

View File

@@ -1,106 +0,0 @@
import type { Page } from "@playwright/test";
import { highlightAndExpectVisible } from "@playwright/utils/highlight";
import { navTest } from "@/playwright/tests/components/navigation/navTest";
import { headerTest } from "@/playwright/tests/components/header/headerTest";
import { footerTest } from "@/playwright/tests/components/footer/footerTest";
export async function runDigitalInputsTest(page: Page) {
await page.goto("/digitalInputs");
//----------------------
await headerTest(page);
await navTest(page);
await footerTest(page);
await page.waitForTimeout(400);
//--------------------
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldungseingänge", exact: true })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldungseingänge 1 " }).locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("heading", { name: "Meldungseingänge 1 " })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Eingang" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Zustand" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Bezeichnung" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "Aktion" }).first()
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "1", exact: true }).locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("1", { exact: true }));
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.getByRole("row", { name: "1 ● DE 1", exact: true })
.getByRole("cell")
.nth(1)
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("row", { name: "1 ● DE 1", exact: true }).locator("span")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "DE 1", exact: true })
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page
.getByRole("row", { name: "1 ● DE 1", exact: true })
.locator("svg")
.nth(1)
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "13", exact: true }).locator("svg")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(page, page.getByText("13", { exact: true }));
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("row", { name: "● DE 13" }).getByRole("cell").nth(1)
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("row", { name: "● DE 13" }).locator("span")
);
await page.waitForTimeout(400);
await highlightAndExpectVisible(
page,
page.getByRole("cell", { name: "DE 13" })
);
await page.waitForTimeout(1000);
}