fix(client): work through the findings from the coverage pass

214 items came out of writing the tests. Real defects are corrected, dead code
is removed rather than covered, and the tests that pinned the old behaviour
move with them.

Also drops two agent coverage scratch files that slipped into the coverage PR
and adds the ignore rule that keeps them out.
This commit is contained in:
Maurice
2026-07-29 11:57:24 +02:00
committed by Maurice
parent a4bf815d24
commit 72a82b3c44
425 changed files with 3155 additions and 1968 deletions
@@ -1326,7 +1326,7 @@ describe('ModalRenderer', () => {
expect(dismissSpy).not.toHaveBeenCalled();
});
it('FE-SN-MODAL-056: pager buttons of the side slots cannot page past the ends', async () => {
it('FE-SN-MODAL-056: the side slots are inert previews, and their pagers cannot page past the ends', async () => {
stubMatchMedia({ mobile: true });
const notices = [
makeNotice({ id: 'n1', titleKey: 'Notice A' }),
@@ -1336,6 +1336,14 @@ describe('ModalRenderer', () => {
render(<ModalRenderer notices={notices} />);
await flushGraceDelay();
// the side slots carry a second copy of the pager and title, so they are
// kept out of the a11y tree and the tab order
const { prevSlot, nextSlot } = sheetParts();
expect(prevSlot.hasAttribute('inert')).toBe(true);
expect(prevSlot.getAttribute('aria-hidden')).toBe('true');
expect(nextSlot.hasAttribute('inert')).toBe(true);
expect(nextSlot.getAttribute('aria-hidden')).toBe('true');
// the next slot renders page 2's pager, whose "previous" button is enabled —
// pressing it must not move the sheet below the first page
const prevButtons = screen.getAllByLabelText('Previous notice') as HTMLButtonElement[];