diff --git a/frontend/src/routes/admin/tags/[id]/TagDeleteGuard.svelte.spec.ts b/frontend/src/routes/admin/tags/[id]/TagDeleteGuard.svelte.spec.ts index 86abf0aa..c7cf6312 100644 --- a/frontend/src/routes/admin/tags/[id]/TagDeleteGuard.svelte.spec.ts +++ b/frontend/src/routes/admin/tags/[id]/TagDeleteGuard.svelte.spec.ts @@ -17,8 +17,10 @@ const allTags = [ describe('TagDeleteGuard', () => { it('renders two radio options (single and subtree)', async () => { render(TagDeleteGuard, { tag, allTags }); - const radios = document.querySelectorAll('input[type="radio"]'); - expect(radios.length).toBe(2); + await expect.element(page.getByRole('radio', { name: /Nur dieses/i })).toBeInTheDocument(); + await expect + .element(page.getByRole('radio', { name: /Gesamten Teilbaum/i })) + .toBeInTheDocument(); }); it('delete button is disabled initially', async () => {