mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-23 19:11:14 +01:00
fix some test errors
This commit is contained in:
parent
3aa7f753b3
commit
175c85d69a
@ -83,14 +83,17 @@ export default function Camera({ camera }) {
|
|||||||
|
|
||||||
let player;
|
let player;
|
||||||
if (viewMode === 'live') {
|
if (viewMode === 'live') {
|
||||||
player = <>
|
player = (
|
||||||
|
<Fragment>
|
||||||
<div>
|
<div>
|
||||||
<JSMpegPlayer camera={camera} />
|
<JSMpegPlayer camera={camera} />
|
||||||
</div>
|
</div>
|
||||||
</>;
|
</Fragment>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else if (viewMode === 'debug') {
|
else if (viewMode === 'debug') {
|
||||||
player = <>
|
player = (
|
||||||
|
<Fragment>
|
||||||
<div>
|
<div>
|
||||||
<AutoUpdatingCameraImage camera={camera} searchParams={searchParams} />
|
<AutoUpdatingCameraImage camera={camera} searchParams={searchParams} />
|
||||||
</div>
|
</div>
|
||||||
@ -102,7 +105,8 @@ export default function Camera({ camera }) {
|
|||||||
<span>{showSettings ? 'Hide' : 'Show'} Options</span>
|
<span>{showSettings ? 'Hide' : 'Show'} Options</span>
|
||||||
</Button>
|
</Button>
|
||||||
{showSettings ? <Card header="Options" elevated={false} content={optionContent} /> : null}
|
{showSettings ? <Card header="Options" elevated={false} content={optionContent} /> : null}
|
||||||
</>;
|
</Fragment>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -32,7 +32,10 @@ describe('Camera Route', () => {
|
|||||||
},
|
},
|
||||||
mockSetOptions,
|
mockSetOptions,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
render(<Camera camera="front" />);
|
render(<Camera camera="front" />);
|
||||||
|
|
||||||
|
fireEvent.click(screen.queryByText('Debug'));
|
||||||
fireEvent.click(screen.queryByText('Show Options'));
|
fireEvent.click(screen.queryByText('Show Options'));
|
||||||
expect(screen.queryByTestId('mock-image')).toHaveTextContent(
|
expect(screen.queryByTestId('mock-image')).toHaveTextContent(
|
||||||
'bbox=1×tamp=0&zones=1&mask=0&motion=1®ions=0'
|
'bbox=1×tamp=0&zones=1&mask=0&motion=1®ions=0'
|
||||||
@ -47,6 +50,7 @@ describe('Camera Route', () => {
|
|||||||
|
|
||||||
render(<Camera camera="front" />);
|
render(<Camera camera="front" />);
|
||||||
|
|
||||||
|
fireEvent.click(screen.queryByText('Debug'));
|
||||||
fireEvent.click(screen.queryByText('Show Options'));
|
fireEvent.click(screen.queryByText('Show Options'));
|
||||||
fireEvent.change(screen.queryByTestId('bbox-input'), { target: { checked: true } });
|
fireEvent.change(screen.queryByTestId('bbox-input'), { target: { checked: true } });
|
||||||
fireEvent.change(screen.queryByTestId('timestamp-input'), { target: { checked: true } });
|
fireEvent.change(screen.queryByTestId('timestamp-input'), { target: { checked: true } });
|
||||||
|
Loading…
Reference in New Issue
Block a user