feat(vorlagen): Editor, Liste und Versionsgeschichte (#24)
Prüfung / pruefung (push) Canceled after 0s
Prüfung / e2e (push) Canceled after 0s

This commit was merged in pull request #24.
This commit is contained in:
2026-09-25 08:23:22 +00:00
parent d8d5444e9f
commit e3d80e5982
65 changed files with 5454 additions and 103 deletions
+15 -1
View File
@@ -1,5 +1,6 @@
import { describe, expect, it } from "vitest";
import { navigationFuer } from "@/lib/navigation";
import { existsSync } from "node:fs";
import { NAVIGATION, navigationFuer } from "@/lib/navigation";
import { darf } from "@/server/auth/rollen";
import type { Rolle } from "@/generated/prisma/enums";
@@ -55,6 +56,19 @@ describe("Aufbau der Eintraege", () => {
}
});
it("hat zu jedem verfuegbaren Eintrag auch eine Seite", () => {
// Das Umstellen von `verfuegbar` ist ein Handgriff im Meilenstein, der die
// Seite liefert. Wird es zu frueh gemacht, zeigt die Navigation auf eine
// 404 – und genau das faellt beim Klicken selten auf, weil man die eigene
// neue Seite kennt und die anderen nicht anfasst.
for (const eintrag of NAVIGATION) {
if (!eintrag.verfuegbar) continue;
const teil = eintrag.pfad === "/" ? "" : eintrag.pfad;
const seite = new URL(`../src/app/(app)${teil}/page.tsx`, import.meta.url);
expect(existsSync(seite), `${eintrag.pfad} ist verfuegbar, hat aber keine page.tsx`).toBe(true);
}
});
it("hat keine doppelten Pfade je Modus", () => {
for (const modus of ["INTERN", "DIENSTLEISTUNG"] as const) {
const pfade = pfadeFuer(modus, "ADMIN");