Files
DOSSIER/e2e/editing.spec.ts
T
Claude 7e30b476cc [49][57] Playwright-UI-Suite e2e/ (14 Tests), npm run e2e, CI-Job e2e
Bedient die gebaute App wie ein Mensch: Start, neues Projekt, Musterhaus,
Wand per Klicks/Befehlszeile, Undo/Redo, Eigenschaft ändern, Geschoss,
3D, Speichern, Export IFC/DXF, DXF-Import. Konsolenfehler scheitern
(Erlaubt-Liste für headless-wgpu). Projekt öffnen im Browser ist kaputt
(readAsArrayBuffer + String) und als test.fail markiert.

Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
2026-10-28 20:33:54 +00:00

50 lines
2.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { blurFocus, elementRows, expect, openSample, openTab, startNewProject, test } from "./app";
import type { Page } from "@playwright/test";
/** Wand W1 (Erdgeschoss, 5 m lang) über den Elemente-Baum wählen. */
async function selectW1(page: Page): Promise<void> {
await openTab(page, "Elemente");
await elementRows(page).filter({ hasText: "W1" }).click();
await expect(page.getByText("Auswahl: 1 Wand")).toBeVisible();
}
test("Auswahl und Eigenschaft ändern: Wand-Oberkante, danach Rückgängig", async ({ page }) => {
await startNewProject(page);
await openSample(page);
await selectW1(page);
// Attribute-Panel: Wand-Abschnitt mit Volumen; Höhe = OK − UK (Geschosshöhe 2.60 m).
const volume = page.getByText("Volumen").locator("..");
await expect(volume).toContainText("3.42 m³");
// Oberkante auf „Eigene" stellen und 3.2 m eintragen.
const top = page.locator(".objinfo-wall-anchor").first();
await top.getByRole("button", { name: "Eigene" }).click();
const topField = top.getByLabel("Eigene Höhe");
await expect(topField).toHaveValue("2.600");
await topField.fill("3.2");
await topField.press("Enter");
await expect(volume).not.toContainText("3.42 m³");
await expect(page.getByText("Höhe").locator("..").filter({ hasText: "3.20 m" })).toBeVisible();
// Fokus ins Plan-Feld, dann Rückgängig: Eigene-Modus und Volumen sind zurück.
await blurFocus(page);
await page.keyboard.press("ControlOrMeta+z");
await page.keyboard.press("ControlOrMeta+z");
await expect(volume).toContainText("3.42 m³");
});
test("Geschoss wechseln", async ({ page }) => {
await startNewProject(page);
await openSample(page);
await openTab(page, "Zeichnungsebenen");
const statusFloor = page.locator("footer.statusbar");
await expect(statusFloor).toContainText("Erdgeschoss");
await page.getByText("Obergeschoss", { exact: true }).click();
await expect(statusFloor).toContainText("Obergeschoss");
await page.getByText("Erdgeschoss", { exact: true }).first().click();
await expect(statusFloor).toContainText("Erdgeschoss");
});