test(coverage): drive browser tests to 80% on all metrics (#496) #505
@@ -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