diff --git a/web/src/routes/__tests__/Camera.test.jsx b/web/src/routes/__tests__/Camera.test.jsx
index 2bdd6c3a2..db5576d70 100644
--- a/web/src/routes/__tests__/Camera.test.jsx
+++ b/web/src/routes/__tests__/Camera.test.jsx
@@ -11,7 +11,7 @@ describe('Camera Route', () => {
beforeEach(() => {
mockSetOptions = jest.fn();
- mockUsePersistence = jest.spyOn(Context, 'usePersistence').mockImplementation(() => [{}, mockSetOptions]);
+ mockUsePersistence = jest.spyOn(Context, 'usePersistence').mockImplementation(() => [{}, mockSetOptions, true]);
jest.spyOn(AutoUpdatingCameraImage, 'default').mockImplementation(({ searchParams }) => {
return
{searchParams.toString()}
;
});
@@ -32,11 +32,12 @@ describe('Camera Route', () => {
regions: false,
},
mockSetOptions,
+ true,
]);
render();
- await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading…'));
+ await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading…'), { timeout: 10 });
fireEvent.click(screen.queryByText('Debug'));
fireEvent.click(screen.queryByText('Show Options'));
@@ -47,20 +48,20 @@ describe('Camera Route', () => {
test('updates camera feed options to persistence', async () => {
mockUsePersistence
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{}, mockSetOptions])
- .mockReturnValueOnce([{ bbox: true }, mockSetOptions])
- .mockReturnValueOnce([{ bbox: true, timestamp: true }, mockSetOptions]);
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{}, mockSetOptions, true])
+ .mockReturnValueOnce([{ bbox: true }, mockSetOptions, true])
+ .mockReturnValueOnce([{ bbox: true, timestamp: true }, mockSetOptions, true]);
render();
- await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading…'));
+ await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading…'), { timeout: 10 });
fireEvent.click(screen.queryByText('Debug'));
fireEvent.click(screen.queryByText('Show Options'));