Files
Agent Zero cd465e0564 feat: add MCP server with resources, tools, auth, and Traefik routing
- Add backend/app/mcp_server.py with FastMCP server (hms-cms)
- Resources: design-rules, page-structure, sync-status
- Tools: trigger_sync, get_sync_log, set_rentman_token, read_file,
  write_file, create_page, deploy, git_commit, git_status
- Bearer token auth via MCP_AUTH_TOKEN env var
- Mount MCP at /mcp with streamable HTTP transport
- Integrate session manager in FastAPI lifespan
- Add Traefik labels for external /mcp route on hms.media-on.de
- Add git, docker.io, curl to backend Dockerfile
- Mount repo root + docker socket in backend container
- Add mcp>=1.0.0 to requirements.txt
2026-07-12 15:58:22 +02:00

97 lines
3.3 KiB
TypeScript

import { test, expect } from "@playwright/test";
test.describe("Impressum Page", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/impressum");
});
test("should display Impressum heading", async ({ page }) => {
await expect(page.locator("h1")).toContainText("Impressum");
});
test("should contain Hammerschmidt u. Mössle GbR", async ({ page }) => {
await expect(page.locator("body")).toContainText("Hammerschmidt u. Mössle GbR");
});
test("should contain address Grockelhofen 10, 89340 Leipheim", async ({ page }) => {
await expect(page.locator("body")).toContainText("Grockelhofen 10");
await expect(page.locator("body")).toContainText("89340 Leipheim");
});
test("should contain phone number", async ({ page }) => {
await expect(page.locator("body")).toContainText("204433");
});
test("should contain email info@hms-licht-ton.de", async ({ page }) => {
await expect(page.locator('a[href="mailto:info@hms-licht-ton.de"]')).toBeVisible();
});
test("should be mobile-responsive at 375px width", async ({ page }) => {
await page.setViewportSize({ width: 375, height: 667 });
await expect(page.locator("h1")).toBeVisible();
});
});
test.describe("Datenschutz Page", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/datenschutz");
});
test("should display Datenschutz heading", async ({ page }) => {
await expect(page.locator("h1")).toContainText("Datenschutz");
});
test("should contain DSGVO-relevant sections", async ({ page }) => {
const body = page.locator("body");
await expect(body).toContainText("Datenerhebung");
await expect(body).toContainText("Cookies");
await expect(body).toContainText("Kontaktformular");
await expect(body).toContainText("Server-Log");
await expect(body).toContainText("Drittanbieter");
});
test("should mention responsible party", async ({ page }) => {
await expect(page.locator("body")).toContainText("Hammerschmidt u. Mössle GbR");
});
test("should be mobile-responsive at 375px width", async ({ page }) => {
await page.setViewportSize({ width: 375, height: 667 });
await expect(page.locator("h1")).toBeVisible();
});
});
test.describe("AGB Vermietung Page", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/agb-vermietung");
});
test("should display AGB heading", async ({ page }) => {
await expect(page.locator("h1")).toContainText("AGB");
});
test("should contain Geltungsbereich section", async ({ page }) => {
await expect(page.locator("body")).toContainText("Geltungsbereich");
});
test("should contain Preise section", async ({ page }) => {
await expect(page.locator("body")).toContainText("Preise");
});
test("should contain Zahlungsbedingungen section", async ({ page }) => {
await expect(page.locator("body")).toContainText("Zahlungsbedingungen");
});
test("should contain Haftung section", async ({ page }) => {
await expect(page.locator("body")).toContainText("Haftung");
});
test("should contain Rückgabe section", async ({ page }) => {
await expect(page.locator("body")).toContainText("Rückgabe");
});
test("should be mobile-responsive at 375px width", async ({ page }) => {
await page.setViewportSize({ width: 375, height: 667 });
await expect(page.locator("h1")).toBeVisible();
});
});