fix(#248): replace document.querySelectorAll with page.getByRole in TagDeleteGuard spec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-17 07:39:06 +02:00
parent e6497ebff4
commit be7009f9ed

View File

@@ -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<HTMLInputElement>('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 () => {