diff --git a/__tests__/components/BoxRegistrationModal.test.tsx b/__tests__/components/BoxRegistrationModal.test.tsx index b6fe9dc..bfe0c14 100644 --- a/__tests__/components/BoxRegistrationModal.test.tsx +++ b/__tests__/components/BoxRegistrationModal.test.tsx @@ -16,13 +16,13 @@ test('Box registration has field for box id', () => { }); test('Box registration has calendar for start date', () => { - expect(screen.getAllByText('1.')).toBeTruthy(); - expect(screen.getAllByText('2.')).toBeTruthy(); - expect(screen.getByText('9.')).toBeTruthy(); - expect(screen.getByText('16.')).toBeTruthy(); - expect(screen.getByText('21.')).toBeTruthy(); - expect(screen.getByText('22.')).toBeTruthy(); - expect(screen.getAllByText('28.')).toBeTruthy(); + expect(screen.getAllByText('1')).toBeTruthy(); + expect(screen.getAllByText('2')).toBeTruthy(); + expect(screen.getByText('9')).toBeTruthy(); + expect(screen.getByText('16')).toBeTruthy(); + expect(screen.getByText('21')).toBeTruthy(); + expect(screen.getByText('22')).toBeTruthy(); + expect(screen.getAllByText('28')).toBeTruthy(); }); test('Box registration saves on button press', async () => { diff --git a/__tests__/setup.ts b/__tests__/setup.ts index 46eab11..98d59a8 100644 --- a/__tests__/setup.ts +++ b/__tests__/setup.ts @@ -45,6 +45,14 @@ beforeAll(() => { postNewIssuesForTitle: vi.fn(), deleteIssue: vi.fn() })); + + const ResizeObserverMock = vi.fn(() => ({ + observe: vi.fn(), + unobserve: vi.fn(), + disconnect: vi.fn(), + })); + vi.stubGlobal('ResizeObserver', ResizeObserverMock); + window.scrollTo = vi.fn(); }); afterEach(() => {