forked from Github/frigate
Show settings cog for camera toggles on mobile (#8098)
* Show settings cog on mobile * Cleanup ui and remove label * Fix tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { h } from 'preact';
|
||||
import * as CameraImage from '../../components/CameraImage';
|
||||
import * as Hooks from '../../hooks';
|
||||
import * as WS from '../../api/ws';
|
||||
import Cameras from '../Cameras';
|
||||
import { fireEvent, render, screen, waitForElementToBeRemoved } from 'testing-library';
|
||||
@@ -8,6 +9,7 @@ describe('Cameras Route', () => {
|
||||
beforeEach(() => {
|
||||
vi.spyOn(CameraImage, 'default').mockImplementation(() => <div data-testid="camera-image" />);
|
||||
vi.spyOn(WS, 'useWs').mockImplementation(() => ({ value: { payload: 'OFF' }, send: vi.fn() }));
|
||||
vi.spyOn(Hooks, 'useResizeObserver').mockImplementation(() => [{ width: 1000 }]);
|
||||
});
|
||||
|
||||
test('shows an ActivityIndicator if not yet loaded', async () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { h } from 'preact';
|
||||
import * as CameraImage from '../../components/CameraImage';
|
||||
import * as WS from '../../api/ws';
|
||||
import * as Hooks from '../../hooks';
|
||||
import Cameras from '../Cameras';
|
||||
import { render, screen, waitForElementToBeRemoved } from 'testing-library';
|
||||
|
||||
@@ -8,6 +9,7 @@ describe('Recording Route', () => {
|
||||
beforeEach(() => {
|
||||
vi.spyOn(CameraImage, 'default').mockImplementation(() => <div data-testid="camera-image" />);
|
||||
vi.spyOn(WS, 'useWs').mockImplementation(() => ({ value: { payload: 'OFF' }, send: jest.fn() }));
|
||||
vi.spyOn(Hooks, 'useResizeObserver').mockImplementation(() => [{ width: 1000 }]);
|
||||
});
|
||||
|
||||
test('shows an ActivityIndicator if not yet loaded', async () => {
|
||||
|
||||
Reference in New Issue
Block a user