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 54080c14a5 - Show all commits

View File

@@ -0,0 +1,33 @@
import { describe, it, expect, afterEach } from 'vitest';
import { cleanup, render } from 'vitest-browser-svelte';
import DocumentNewPage from './+page.svelte';
afterEach(cleanup);
describe('documents/new page', () => {
it('renders the BulkDocumentEditLayout with prop pass-through', async () => {
render(DocumentNewPage, {
props: {
data: {
initialSenderId: 'p1',
initialSenderName: 'Anna Schmidt',
initialReceivers: []
}
}
});
const main = document.body.firstElementChild;
expect(main).not.toBeNull();
});
it('renders without crashing when initial values are empty', async () => {
render(DocumentNewPage, {
props: {
data: { initialSenderId: '', initialSenderName: '', initialReceivers: [] }
}
});
const main = document.body.firstElementChild;
expect(main).not.toBeNull();
});
});