test(admin): convert .not.toThrow into form-stays-mounted assertion (admin/groups/new)
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m4s
CI / OCR Service Tests (push) Successful in 17s
CI / Backend Unit Tests (push) Successful in 4m5s
CI / fail2ban Regex (push) Successful in 39s
CI / Compose Bucket Idempotency (push) Failing after 10s
nightly / deploy-staging (push) Failing after 1m25s
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m4s
CI / OCR Service Tests (push) Successful in 17s
CI / Backend Unit Tests (push) Successful in 4m5s
CI / fail2ban Regex (push) Successful in 39s
CI / Compose Bucket Idempotency (push) Failing after 10s
nightly / deploy-staging (push) Failing after 1m25s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit was merged in pull request #505.
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