test(admin): convert .not.toThrow into form-stays-mounted assertion (admin/groups/new)
Some checks failed
CI / Unit & Component Tests (push) Failing after 1m47s
CI / OCR Service Tests (push) Successful in 16s
CI / Unit & Component Tests (pull_request) Failing after 1m53s
CI / OCR Service Tests (pull_request) Successful in 16s
CI / Backend Unit Tests (push) Successful in 4m12s
CI / Backend Unit Tests (pull_request) Successful in 4m11s
Some checks failed
CI / Unit & Component Tests (push) Failing after 1m47s
CI / OCR Service Tests (push) Successful in 16s
CI / Unit & Component Tests (pull_request) Failing after 1m53s
CI / OCR Service Tests (pull_request) Successful in 16s
CI / Backend Unit Tests (push) Successful in 4m12s
CI / Backend Unit Tests (pull_request) Successful in 4m11s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user