fix: 1:1 prototype port – exact hms-* CSS, real logo, all components from app.js

This commit is contained in:
Implementation Engineer
2026-07-10 22:28:26 +02:00
parent 786cb0c040
commit 90a7d7f2e0
38 changed files with 2733 additions and 3250 deletions
+43 -45
View File
@@ -2,87 +2,85 @@ import { describe, it, expect } from "vitest";
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
describe("Warenkorb Page", () => {
describe("Warenkorb Page (prototype port)", () => {
const pagePath = resolve(__dirname, "../../pages/warenkorb.vue");
const content = readFileSync(pagePath, "utf-8");
it("should have page title Warenkorb", () => {
expect(content).toContain("Warenkorb");
expect(content).toContain('data-testid="warenkorb-title"');
it("should have page title Mietanfrage", () => {
expect(content).toContain("Mietanfrage");
});
it("should use useCart composable", () => {
expect(content).toContain("useCart");
});
it("should have breadcrumb navigation", () => {
expect(content).toContain("Breadcrumb");
expect(content).toContain('to="/"');
});
it("should have empty state with link to mietkatalog", () => {
expect(content).toContain('data-testid="warenkorb-empty"');
expect(content).toContain('to="/mietkatalog"');
expect(content).toContain("Ihr Warenkorb ist leer");
expect(content).toContain("EmptyState");
expect(content).toContain("Warenkorb ist leer");
expect(content).toContain("/mietkatalog");
});
it("should have cart item list with data-testid", () => {
expect(content).toContain('data-testid="warenkorb-item"');
});
it("should have item name with link to detail page", () => {
expect(content).toContain('data-testid="warenkorb-item-name"');
expect(content).toContain("/mietkatalog/");
it("should have cart item list", () => {
expect(content).toContain("cartItems");
expect(content).toContain("v-for");
});
it("should have quantity stepper with increment and decrement", () => {
expect(content).toContain('data-testid="warenkorb-item-stepper"');
expect(content).toContain('data-testid="warenkorb-item-decrement"');
expect(content).toContain('data-testid="warenkorb-item-increment"');
expect(content).toContain("decrementQuantity");
expect(content).toContain("incrementQuantity");
expect(content).toContain("decrementQuantity");
});
it("should display item quantity", () => {
expect(content).toContain('data-testid="warenkorb-item-quantity"');
expect(content).toContain("item.quantity");
});
it("should have remove button", () => {
expect(content).toContain('data-testid="warenkorb-item-remove"');
expect(content).toContain("removeItem");
});
it("should have clear cart button", () => {
expect(content).toContain('data-testid="warenkorb-clear"');
expect(content).toContain("clearCart");
expect(content).toContain("Warenkorb leeren");
});
it("should have checkout link to mietanfrage", () => {
expect(content).toContain('data-testid="warenkorb-checkout"');
expect(content).toContain('to="/mietanfrage"');
expect(content).toContain("Zur Mietanfrage");
});
it("should display total count", () => {
expect(content).toContain("totalCount");
});
it("should have request form with name field", () => {
expect(content).toContain('id="req-name"');
expect(content).toContain("Name");
});
it("should have request form with email field", () => {
expect(content).toContain('id="req-email"');
expect(content).toContain("E-Mail");
});
it("should have request form with event date field", () => {
expect(content).toContain('id="req-date"');
expect(content).toContain("Veranstaltungsdatum");
});
it("should have request form with location field", () => {
expect(content).toContain('id="req-location"');
expect(content).toContain("Veranstaltungsort");
});
it("should have submit button", () => {
expect(content).toContain("Anfrage absenden");
});
it("should have success state", () => {
expect(content).toContain("Mietanfrage übermittelt");
expect(content).toContain("Vielen Dank");
});
it("should have hms-card for items", () => {
expect(content).toContain("hms-card");
});
it("should use TypeScript with lang=ts", () => {
expect(content).toContain('<script setup lang="ts">');
});
it("should use Tailwind classes, no inline styles", () => {
expect(content).not.toContain('style="');
});
it("should use useHead for page title", () => {
expect(content).toContain("useHead");
});
it("should have formatPrice function", () => {
expect(content).toContain("formatPrice");
expect(content).toContain("Intl.NumberFormat");
});
});