2026-07-10 01:02:27 +02:00
|
|
|
import { describe, it, expect } from "vitest";
|
|
|
|
|
import { readFileSync } from "node:fs";
|
|
|
|
|
import { resolve } from "node:path";
|
|
|
|
|
|
2026-07-10 22:28:26 +02:00
|
|
|
describe("Referenzen Page (prototype port)", () => {
|
2026-07-10 01:02:27 +02:00
|
|
|
const pagePath = resolve(__dirname, "../../pages/referenzen.vue");
|
|
|
|
|
const content = readFileSync(pagePath, "utf-8");
|
|
|
|
|
|
|
|
|
|
it("should have page title Referenzen", () => {
|
|
|
|
|
expect(content).toContain("Referenzen");
|
|
|
|
|
});
|
|
|
|
|
|
2026-07-10 22:28:26 +02:00
|
|
|
it("should have hms-gallery grid", () => {
|
|
|
|
|
expect(content).toContain("hms-gallery");
|
2026-07-10 01:02:27 +02:00
|
|
|
});
|
|
|
|
|
|
2026-07-10 22:28:26 +02:00
|
|
|
it("should have 9 reference images", () => {
|
|
|
|
|
expect(content).toContain("ref1.jpg");
|
|
|
|
|
expect(content).toContain("ref9.jpg");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("should have category filter chips with hms-chip", () => {
|
|
|
|
|
expect(content).toContain("hms-chip");
|
2026-07-10 01:02:27 +02:00
|
|
|
expect(content).toContain("Alle");
|
|
|
|
|
expect(content).toContain("Open-Air");
|
|
|
|
|
expect(content).toContain("Indoor");
|
|
|
|
|
expect(content).toContain("Rigging");
|
2026-07-10 22:28:26 +02:00
|
|
|
expect(content).toContain("Event");
|
2026-07-10 01:02:27 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("should have filter logic with computed filteredImages", () => {
|
|
|
|
|
expect(content).toContain("filteredImages");
|
2026-07-10 22:28:26 +02:00
|
|
|
expect(content).toContain("filter");
|
2026-07-10 01:02:27 +02:00
|
|
|
expect(content).toContain("computed");
|
|
|
|
|
});
|
|
|
|
|
|
2026-07-10 22:28:26 +02:00
|
|
|
it("should have loading skeleton state", () => {
|
|
|
|
|
expect(content).toContain("hms-skeleton");
|
|
|
|
|
expect(content).toContain("loading");
|
2026-07-10 01:02:27 +02:00
|
|
|
});
|
|
|
|
|
|
2026-07-10 22:28:26 +02:00
|
|
|
it("should use ErrorState component", () => {
|
|
|
|
|
expect(content).toContain("ErrorState");
|
2026-07-10 01:02:27 +02:00
|
|
|
});
|
|
|
|
|
|
2026-07-10 22:28:26 +02:00
|
|
|
it("should use EmptyState component", () => {
|
|
|
|
|
expect(content).toContain("EmptyState");
|
2026-07-10 01:02:27 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("should use TypeScript with lang=ts", () => {
|
|
|
|
|
expect(content).toContain('<script setup lang="ts">');
|
|
|
|
|
});
|
|
|
|
|
});
|