mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
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:
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user