- Add support for Frigate reviews / detections. - Add support for GenAI metadata. - Significant internal refactor to more flexible "UnifiedQuery" to allow mixing cameras with simple metadata and review metadata (e.g. a timeline view of a Frigate camera with reviews, and a Reolink camera with simple metadata). - Add support for folder media as camera media. There are a few more PRs to commit prior to this going live, but commiting this for now due to the scale of the change. BREAKING CHANGE: `media_type` and `events_type` are retired under `live`, `viewer` and `timeline` configuration sections, instead media type is associated (once) with the camera under `media`.
31 lines
916 B
TypeScript
31 lines
916 B
TypeScript
import { expect, it } from 'vitest';
|
|
import { SetQueryViewModifier } from '../../../../src/card-controller/view/modifiers/set-query';
|
|
import { QueryResults } from '../../../../src/view/query-results';
|
|
import { UnifiedQuery } from '../../../../src/view/unified-query';
|
|
import { createView } from '../../../test-utils';
|
|
|
|
it('should do nothing without arguments', () => {
|
|
const view = createView();
|
|
|
|
const modifier = new SetQueryViewModifier();
|
|
modifier.modify(view);
|
|
|
|
expect(view.query).toBeNull();
|
|
expect(view.queryResults).toBeNull();
|
|
});
|
|
|
|
it('should set query and results', () => {
|
|
const view = createView();
|
|
const query = new UnifiedQuery();
|
|
const queryResults = new QueryResults();
|
|
|
|
const modifier = new SetQueryViewModifier({
|
|
query: query,
|
|
queryResults: queryResults,
|
|
});
|
|
modifier.modify(view);
|
|
|
|
expect(view.query).toBe(query);
|
|
expect(view.queryResults).toBe(queryResults);
|
|
});
|