diff --git a/web/src/routes/__tests__/Cameras.test.jsx b/web/src/routes/__tests__/Cameras.test.jsx index 6fee585f4..9828e527c 100644 --- a/web/src/routes/__tests__/Cameras.test.jsx +++ b/web/src/routes/__tests__/Cameras.test.jsx @@ -12,8 +12,8 @@ describe('Cameras Route', () => { useConfigMock = jest.spyOn(Api, 'useConfig').mockImplementation(() => ({ data: { cameras: { - front: { name: 'front', objects: { track: ['taco', 'cat', 'dog'] } }, - side: { name: 'side', objects: { track: ['taco', 'cat', 'dog'] } }, + front: { name: 'front', objects: { track: ['taco', 'cat', 'dog'] }, record: { enabled: true } }, + side: { name: 'side', objects: { track: ['taco', 'cat', 'dog'] }, record: { enabled: false } }, }, }, status: 'loaded', @@ -41,6 +41,14 @@ describe('Cameras Route', () => { expect(screen.queryByText('side').closest('a')).toHaveAttribute('href', '/cameras/side'); }); + test('shows recordings link', async () => { + render(); + + expect(screen.queryByLabelText('Loading…')).not.toBeInTheDocument(); + + expect(screen.queryAllByText('Recordings')).toHaveLength(1); + }); + test('buttons toggle detect, clips, and snapshots', async () => { const sendDetect = jest.fn(); const sendClips = jest.fn();