test(coverage): drive browser tests to 80% on all metrics (#496) #505

Merged
marcel merged 189 commits from feat/issue-496-browser-coverage-tests into main 2026-05-11 21:50:39 +02:00
Showing only changes of commit 7ee50e6541 - Show all commits

View File

@@ -90,11 +90,14 @@ describe('admin/groups/new page', () => {
expect(document.body.textContent).not.toMatch(/ungespeicherte/i);
});
it('marks the form dirty after an input event without throwing', async () => {
it('keeps the form mounted after an input event (oninput handler does not unmount)', async () => {
render(AdminGroupNewPage, { props: { form: undefined } });
const form = document.querySelector('form') as HTMLFormElement;
expect(() => form.dispatchEvent(new Event('input', { bubbles: true }))).not.toThrow();
expect(form).not.toBeNull();
form.dispatchEvent(new Event('input', { bubbles: true }));
expect(document.querySelector('form')).not.toBeNull();
});
it('hides the form error banner when form is undefined (already covered, branch 2)', async () => {