0.53.1: fehlenden Nextcloud-Ordner beim Speichern und in der Ablage nachholen
Some checks failed
Prüfung / tests (push) Has been cancelled
Prüfung / container (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
Claude
2026-11-13 19:49:03 +00:00
parent fc9a4c4dcf
commit 3190bce0d0
6 changed files with 22 additions and 6 deletions

View File

@@ -489,9 +489,17 @@ describe.skipIf(!url)("Projektordner in der Nextcloud über die API", () => {
const r = await app.inject({ method: "POST", url: "/api/projekte", payload: { nummer: "A-26-131", bezeichnung: "Gaube", status: "angebot" } });
expect(r.statusCode).toBe(201);
expect(r.json().ordner_fehler).toMatch(/Nextcloud/);
const r2 = await app.inject({ method: "POST", url: "/api/projekte", payload: { nummer: "A-26-132", bezeichnung: "Vordach", status: "angebot" } });
const r3 = await app.inject({ method: "POST", url: "/api/projekte", payload: { nummer: "A-26-133", bezeichnung: "Schuppen", status: "angebot" } });
f.ordner.add(f.wurzel);
const nochmal = (await app.inject({ method: "POST", url: `/api/projekte/${r.json().id}/ordner` })).json();
expect(nochmal.nextcloud_link).toBe("01 Angebot/A-26-131 Gaube");
// ohne Ordner holt jedes Speichern und das Öffnen der Ablage die Anlage nach (Henning, 13.11.2026)
const gespeichert = (await app.inject({ method: "PATCH", url: `/api/projekte/${r2.json().id}`, payload: { baustelle_ort: "Mölln" } })).json();
expect(gespeichert.nextcloud_link).toBe("01 Angebot/A-26-132 Vordach");
const ablage = (await app.inject(`/api/projekte/${r3.json().id}/ablage`)).json();
expect(ablage.ordner).toBe("01 Angebot/A-26-133 Schuppen");
expect(ablage.eintraege.map((e: { name: string }) => e.name)).toEqual(["01 Auftrag", "02 Umsetzung", "03 Bilder"]);
});
it("Testversion: der erste neue Benutzer legt den bisherigen Inhaber mit an", async () => {