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
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
|
||||
test.describe("Mietanfrage Page", () => {
|
||||
test("should render mietanfrage page with heading", async ({ page }) => {
|
||||
await page.goto("/mietanfrage");
|
||||
await expect(page.locator("h1")).toContainText("Mietanfrage");
|
||||
});
|
||||
|
||||
test("should show empty cart state when no items in cart", async ({ page }) => {
|
||||
await page.goto("/mietanfrage");
|
||||
await expect(page.getByTestId("mietanfrage-empty-cart")).toBeVisible();
|
||||
});
|
||||
|
||||
test("should have link to mietkatalog from empty cart state", async ({ page }) => {
|
||||
await page.goto("/mietanfrage");
|
||||
const cta = page.getByTestId("mietanfrage-empty-cta");
|
||||
await expect(cta).toBeVisible();
|
||||
await expect(cta).toHaveAttribute("href", "/mietkatalog");
|
||||
});
|
||||
|
||||
test("should have breadcrumb with warenkorb link", async ({ page }) => {
|
||||
await page.goto("/mietanfrage");
|
||||
const breadcrumb = page.locator('nav[aria-label="Breadcrumb"]');
|
||||
await expect(breadcrumb).toBeVisible();
|
||||
await expect(breadcrumb.locator('a[href="/warenkorb"]')).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user