fix: Always fetch media for "most recent media" views (#1791)

This commit is contained in:
Dermot Duffy
2024-12-23 16:22:10 -08:00
committed by GitHub
parent 9d812af9f4
commit bc95f55cb0
2 changed files with 3 additions and 41 deletions
@@ -345,37 +345,6 @@ describe('ViewQueryExecutor', () => {
);
});
describe('with an media viewer view', () => {
it('should not fetch anything if configured for no thumbnails', async () => {
const executor = mock<QueryExecutor>();
const viewQueryExecutor = new ViewQueryExecutor(
createPopulatedAPI({
media_viewer: {
controls: {
thumbnails: {
mode: 'none' as const,
},
},
},
}),
executor,
);
const view = new View({
view: 'clip',
camera: 'camera.office',
});
const modifiers = await viewQueryExecutor.getNewQueryModifiers(view);
applyViewModifiers(view, modifiers);
expect(view?.query).toBeNull();
expect(view?.queryResults).toBeNull();
expect(executor.executeDefaultEventQuery).not.toHaveBeenCalled();
expect(executor.executeDefaultRecordingQuery).not.toHaveBeenCalled();
});
});
describe('when setting or removing seek time', () => {
it('should set seek time when results are selected based on time', async () => {
const now = new Date();