diff --git a/frontend/src/routes/layout.svelte.spec.ts b/frontend/src/routes/layout.svelte.spec.ts index dc8c50d2..e0594d1f 100644 --- a/frontend/src/routes/layout.svelte.spec.ts +++ b/frontend/src/routes/layout.svelte.spec.ts @@ -90,6 +90,16 @@ describe('Layout – upload link', () => { .element(page.getByRole('link', { name: /Hochladen|Upload|Subir/i })) .not.toBeInTheDocument(); }); + + it('is hidden for an ANNOTATE_ALL-only user (gate is lack of WRITE_ALL, not READ_ALL)', async () => { + render(Layout, { + data: makeData({ canWrite: false, canAnnotate: true }), + children: emptySnippet + }); + await expect + .element(page.getByRole('link', { name: /Hochladen|Upload|Subir/i })) + .not.toBeInTheDocument(); + }); }); // ─── Dropdown ─────────────────────────────────────────────────────────────────