test: Split test utilities to improve test times (#2622)
This commit is contained in:
@@ -13,12 +13,11 @@ import { View } from '../../../src/view/view';
|
||||
import {
|
||||
createCameraManager,
|
||||
createCapabilities,
|
||||
createCardAPI,
|
||||
createConfig,
|
||||
createFolder,
|
||||
createStore,
|
||||
createView,
|
||||
} from '../../test-utils';
|
||||
} from '../../camera-manager/test-utils';
|
||||
import { createConfig } from '../../config/test-utils';
|
||||
import { createCardAPI, createFolder } from '../../test-utils';
|
||||
import { createView } from '../../view/test-utils';
|
||||
import { createPopulatedAPI } from './test-utils';
|
||||
|
||||
describe('getViewDefault', () => {
|
||||
@@ -51,7 +50,7 @@ describe('getViewDefault', () => {
|
||||
);
|
||||
|
||||
const factory = new ViewFactory(api);
|
||||
expect(() => factory.getViewDefault()).toThrowError(ViewIncompatible);
|
||||
expect(() => factory.getViewDefault()).toThrow(ViewIncompatible);
|
||||
});
|
||||
|
||||
it('should use folders view as default when folders exist without cameras', () => {
|
||||
@@ -245,7 +244,7 @@ describe('getViewByParameters', () => {
|
||||
view: 'snapshots',
|
||||
},
|
||||
}),
|
||||
).toThrowError(ViewIncompatible);
|
||||
).toThrow(ViewIncompatible);
|
||||
});
|
||||
|
||||
describe('should handle no camera for view with failsafe', () => {
|
||||
@@ -325,7 +324,7 @@ describe('getViewByParameters', () => {
|
||||
view: 'snapshots',
|
||||
},
|
||||
}),
|
||||
).toThrowError(ViewIncompatible);
|
||||
).toThrow(ViewIncompatible);
|
||||
});
|
||||
|
||||
it('should choose live view with failsafe', () => {
|
||||
@@ -373,7 +372,7 @@ describe('getViewByParameters', () => {
|
||||
view: 'snapshots',
|
||||
},
|
||||
}),
|
||||
).toThrowError(ViewIncompatible);
|
||||
).toThrow(ViewIncompatible);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -5,12 +5,8 @@ import { ViewItemManager } from '../../../src/card-controller/view/item-manager'
|
||||
import { homeAssistantGetSignedURLIfNecessary } from '../../../src/ha/sign-path.js';
|
||||
import { downloadURL } from '../../../src/utils/download';
|
||||
import { ViewFolder, ViewMediaType } from '../../../src/view/item';
|
||||
import {
|
||||
createCardAPI,
|
||||
createFolder,
|
||||
createHASS,
|
||||
TestViewMedia,
|
||||
} from '../../test-utils';
|
||||
import { createCardAPI, createFolder, createHASS } from '../../test-utils';
|
||||
import { TestViewMedia } from '../../view/test-utils';
|
||||
|
||||
vi.mock('../../../src/utils/download');
|
||||
vi.mock('../../../src/ha/sign-path.js');
|
||||
@@ -95,7 +91,7 @@ describe('ViewItemManager', () => {
|
||||
vi.mocked(homeAssistantGetSignedURLIfNecessary).mockRejectedValue(signError);
|
||||
|
||||
expect(await manager.download(item)).toBe(false);
|
||||
expect(api.getNotificationManager().setNotification).toBeCalledWith(
|
||||
expect(api.getNotificationManager().setNotification).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
heading: expect.objectContaining({
|
||||
text: 'Download failed',
|
||||
@@ -126,7 +122,7 @@ describe('ViewItemManager', () => {
|
||||
);
|
||||
|
||||
expect(await manager.download(item)).toBe(true);
|
||||
expect(downloadURL).toBeCalledWith(
|
||||
expect(downloadURL).toHaveBeenCalledWith(
|
||||
'http://foo/signed-url',
|
||||
'camera-office_id.mp4',
|
||||
);
|
||||
@@ -149,7 +145,7 @@ describe('ViewItemManager', () => {
|
||||
);
|
||||
|
||||
expect(await manager.download(item)).toBe(true);
|
||||
expect(downloadURL).toBeCalledWith('http://foo/signed-url', 'media_id.mp4');
|
||||
expect(downloadURL).toHaveBeenCalledWith('http://foo/signed-url', 'media_id.mp4');
|
||||
});
|
||||
|
||||
it('should download media without signing', async () => {
|
||||
@@ -165,7 +161,7 @@ describe('ViewItemManager', () => {
|
||||
});
|
||||
|
||||
expect(await manager.download(item)).toBe(true);
|
||||
expect(downloadURL).toBeCalledWith('foo', 'camera-office_id.mp4');
|
||||
expect(downloadURL).toHaveBeenCalledWith('foo', 'camera-office_id.mp4');
|
||||
});
|
||||
|
||||
it('should download media without camera or folder', async () => {
|
||||
@@ -176,7 +172,7 @@ describe('ViewItemManager', () => {
|
||||
const item = new TestViewMedia({ cameraID: null, folder: null });
|
||||
|
||||
expect(await manager.download(item)).toBe(false);
|
||||
expect(api.getNotificationManager().setNotification).toBeCalledWith(
|
||||
expect(api.getNotificationManager().setNotification).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
heading: expect.objectContaining({
|
||||
text: 'Download failed',
|
||||
@@ -203,7 +199,7 @@ describe('ViewItemManager', () => {
|
||||
});
|
||||
|
||||
expect(await manager.download(item)).toBe(true);
|
||||
expect(downloadURL).toBeCalledWith('foo', 'camera.mp4');
|
||||
expect(downloadURL).toHaveBeenCalledWith('foo', 'camera.mp4');
|
||||
});
|
||||
|
||||
it('should generate filename for media with start time', async () => {
|
||||
@@ -223,7 +219,7 @@ describe('ViewItemManager', () => {
|
||||
|
||||
// Use format() to generate expected filename timestamp (formats in local time)
|
||||
const expectedFilename = `camera_id_${format(startTime, 'yyyy-MM-dd-HH-mm-ss')}.mp4`;
|
||||
expect(downloadURL).toBeCalledWith('foo', expectedFilename);
|
||||
expect(downloadURL).toHaveBeenCalledWith('foo', expectedFilename);
|
||||
});
|
||||
|
||||
it('should generate filename for snapshot', async () => {
|
||||
@@ -239,7 +235,7 @@ describe('ViewItemManager', () => {
|
||||
});
|
||||
|
||||
expect(await manager.download(item)).toBe(true);
|
||||
expect(downloadURL).toBeCalledWith('foo', 'camera_id.jpg');
|
||||
expect(downloadURL).toHaveBeenCalledWith('foo', 'camera_id.jpg');
|
||||
});
|
||||
|
||||
it('should generate filename for folder without title', async () => {
|
||||
@@ -255,7 +251,7 @@ describe('ViewItemManager', () => {
|
||||
});
|
||||
|
||||
expect(await manager.download(item)).toBe(true);
|
||||
expect(downloadURL).toBeCalledWith('foo', 'media');
|
||||
expect(downloadURL).toHaveBeenCalledWith('foo', 'media');
|
||||
});
|
||||
|
||||
it('should generate filename for folder with title', async () => {
|
||||
@@ -271,7 +267,7 @@ describe('ViewItemManager', () => {
|
||||
});
|
||||
|
||||
expect(await manager.download(item)).toBe(true);
|
||||
expect(downloadURL).toBeCalledWith('foo', 'title');
|
||||
expect(downloadURL).toHaveBeenCalledWith('foo', 'title');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -288,7 +284,7 @@ describe('ViewItemManager', () => {
|
||||
|
||||
await manager.favorite(item, true);
|
||||
|
||||
expect(api.getCameraManager().favoriteMedia).toBeCalledWith(item, true);
|
||||
expect(api.getCameraManager().favoriteMedia).toHaveBeenCalledWith(item, true);
|
||||
});
|
||||
|
||||
it('should favorite folder media', async () => {
|
||||
@@ -302,7 +298,7 @@ describe('ViewItemManager', () => {
|
||||
|
||||
await manager.favorite(item, true);
|
||||
|
||||
expect(api.getFoldersManager().favorite).toBeCalledWith(item, true);
|
||||
expect(api.getFoldersManager().favorite).toHaveBeenCalledWith(item, true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -318,7 +314,7 @@ describe('ViewItemManager', () => {
|
||||
|
||||
await manager.reviewMedia(item, true);
|
||||
|
||||
expect(api.getCameraManager().reviewMedia).toBeCalledWith(item, true);
|
||||
expect(api.getCameraManager().reviewMedia).toHaveBeenCalledWith(item, true);
|
||||
});
|
||||
|
||||
it('should not review non-review media', async () => {
|
||||
@@ -332,7 +328,7 @@ describe('ViewItemManager', () => {
|
||||
|
||||
await manager.reviewMedia(item, true);
|
||||
|
||||
expect(api.getCameraManager().reviewMedia).not.toBeCalled();
|
||||
expect(api.getCameraManager().reviewMedia).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import { MergeContextViewModifier } from '../../../../src/card-controller/view/m
|
||||
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';
|
||||
import { createView } from '../../../view/test-utils';
|
||||
|
||||
it('should apply view modifiers', () => {
|
||||
const view = createView();
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { ViewContext } from 'view';
|
||||
import { expect, it } from 'vitest';
|
||||
|
||||
import { MergeContextViewModifier } from '../../../../src/card-controller/view/modifiers/merge-context';
|
||||
import { createView } from '../../../test-utils';
|
||||
import { createView } from '../../../view/test-utils';
|
||||
|
||||
it('should merge context', () => {
|
||||
const context: ViewContext = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect, it } from 'vitest';
|
||||
|
||||
import { RemoveContextPropertyViewModifier } from '../../../../src/card-controller/view/modifiers/remove-context-property';
|
||||
import { createView } from '../../../test-utils';
|
||||
import { createView } from '../../../view/test-utils';
|
||||
|
||||
it('should remove context property', () => {
|
||||
const modifier = new RemoveContextPropertyViewModifier('timeline', 'window');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { expect, it } from 'vitest';
|
||||
|
||||
import { RemoveContextViewModifier } from '../../../../src/card-controller/view/modifiers/remove-context';
|
||||
import { createView } from '../../../test-utils';
|
||||
import { createView } from '../../../view/test-utils';
|
||||
|
||||
it('should remove context property', () => {
|
||||
const modifier = new RemoveContextViewModifier(['timeline']);
|
||||
|
||||
@@ -3,7 +3,7 @@ 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';
|
||||
import { createView } from '../../../view/test-utils';
|
||||
|
||||
it('should do nothing without arguments', () => {
|
||||
const view = createView();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { SubstreamViewModifier } from '../../../../src/card-controller/view/modifiers/substream';
|
||||
import { createView } from '../../../test-utils';
|
||||
import { createView } from '../../../view/test-utils';
|
||||
|
||||
describe('SubstreamViewModifier', () => {
|
||||
it('should write the override for the selected camera', () => {
|
||||
|
||||
@@ -2,7 +2,8 @@ import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { sortItems } from '../../../src/card-controller/view/sort.js';
|
||||
import { ViewFolder } from '../../../src/view/item.js';
|
||||
import { createFolder, TestViewMedia } from '../../test-utils.js';
|
||||
import { createFolder } from '../../test-utils.js';
|
||||
import { TestViewMedia } from '../../view/test-utils';
|
||||
|
||||
describe('sortMedia', () => {
|
||||
const media_1 = new TestViewMedia({
|
||||
|
||||
@@ -5,10 +5,10 @@ import type { RawAdvancedCameraCardConfig } from '../../../src/config/types';
|
||||
import {
|
||||
createCameraManager,
|
||||
createCapabilities,
|
||||
createCardAPI,
|
||||
createConfig,
|
||||
createStore,
|
||||
} from '../../test-utils';
|
||||
} from '../../camera-manager/test-utils';
|
||||
import { createConfig } from '../../config/test-utils';
|
||||
import { createCardAPI } from '../../test-utils';
|
||||
|
||||
export const createPopulatedAPI = (
|
||||
config?: RawAdvancedCameraCardConfig,
|
||||
|
||||
@@ -16,7 +16,8 @@ import { ViewMedia, ViewMediaType } from '../../../src/view/item';
|
||||
import { QueryResults } from '../../../src/view/query-results';
|
||||
import { UnifiedQuery } from '../../../src/view/unified-query';
|
||||
import type { View } from '../../../src/view/view';
|
||||
import { createCardAPI, createEventQuery, createView } from '../../test-utils';
|
||||
import { createCardAPI } from '../../test-utils';
|
||||
import { createEventQuery, createView } from '../../view/test-utils';
|
||||
|
||||
const createInitializedCardAPI = (initialized?: boolean): CardController => {
|
||||
const api = createCardAPI();
|
||||
@@ -44,17 +45,17 @@ describe('should act correctly when view is set', () => {
|
||||
|
||||
expect(manager.getView()).toBe(view);
|
||||
expect(manager.hasView()).toBeTruthy();
|
||||
expect(api.getMediaLoadedInfoManager().setSelected).toBeCalledWith('camera');
|
||||
expect(api.getCardElementManager().scrollReset).toBeCalled();
|
||||
expect(api.getStyleManager().setExpandedMode).toBeCalled();
|
||||
expect(api.getConditionStateManager()?.setState).toBeCalledWith({
|
||||
expect(api.getMediaLoadedInfoManager().setSelected).toHaveBeenCalledWith('camera');
|
||||
expect(api.getCardElementManager().scrollReset).toHaveBeenCalled();
|
||||
expect(api.getStyleManager().setExpandedMode).toHaveBeenCalled();
|
||||
expect(api.getConditionStateManager()?.setState).toHaveBeenCalledWith({
|
||||
view: 'live',
|
||||
camera: 'camera',
|
||||
displayMode: 'grid',
|
||||
targetID: 'camera',
|
||||
substreamID: undefined,
|
||||
});
|
||||
expect(api.getCardElementManager().update).toBeCalled();
|
||||
expect(api.getCardElementManager().update).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should set the engaged substream in condition state', () => {
|
||||
@@ -70,7 +71,7 @@ describe('should act correctly when view is set', () => {
|
||||
const api = createInitializedCardAPI();
|
||||
new ViewManager(api, { viewFactory: factory }).setViewDefault();
|
||||
|
||||
expect(api.getConditionStateManager()?.setState).toBeCalledWith(
|
||||
expect(api.getConditionStateManager()?.setState).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ substreamID: 'substream' }),
|
||||
);
|
||||
});
|
||||
@@ -102,7 +103,7 @@ describe('should act correctly when view is set', () => {
|
||||
expect(manager.getView()).toBe(view_2);
|
||||
|
||||
// Same view name, so scrolling should not happen.
|
||||
expect(api.getCardElementManager().scrollReset).not.toBeCalled();
|
||||
expect(api.getCardElementManager().scrollReset).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -341,7 +342,7 @@ it('should set view by parameters with an explicitly provided existing query', a
|
||||
await manager.setViewByParametersWithExistingQuery({ params: { query } });
|
||||
|
||||
// An explicitly-passed query is used as-is rather than the base view's.
|
||||
expect(viewFactory.getViewByParameters).toBeCalledWith(
|
||||
expect(viewFactory.getViewByParameters).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ params: expect.objectContaining({ query }) }),
|
||||
);
|
||||
});
|
||||
@@ -362,7 +363,7 @@ it('should clear the query when an explicit null query is passed', async () => {
|
||||
|
||||
// An explicit `null` is respected (clears the query), not overridden by the
|
||||
// base view's query.
|
||||
expect(viewFactory.getViewByParameters).toBeCalledWith(
|
||||
expect(viewFactory.getViewByParameters).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ params: expect.objectContaining({ query: null }) }),
|
||||
);
|
||||
});
|
||||
@@ -384,13 +385,13 @@ describe('should handle exceptions', () => {
|
||||
|
||||
expect(manager.hasView()).toBeTruthy();
|
||||
expect(manager.getView()).toBe(failSafeView);
|
||||
expect(viewFactory.getViewDefault).toBeCalledWith(
|
||||
expect(viewFactory.getViewDefault).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ baseView: null, failSafe: true }),
|
||||
);
|
||||
expect(api.getIssueManager().trigger).toBeCalledWith('view_incompatible', {
|
||||
expect(api.getIssueManager().trigger).toHaveBeenCalledWith('view_incompatible', {
|
||||
error,
|
||||
});
|
||||
expect(api.getNotificationManager().setNotification).not.toBeCalled();
|
||||
expect(api.getNotificationManager().setNotification).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not retry with failSafe when existing view in sync calls', () => {
|
||||
@@ -409,8 +410,8 @@ describe('should handle exceptions', () => {
|
||||
manager.setViewDefault();
|
||||
|
||||
expect(manager.getView()).toBe(existingView);
|
||||
expect(viewFactory.getViewDefault).toBeCalledTimes(2);
|
||||
expect(api.getIssueManager().trigger).toBeCalledWith('view_incompatible', {
|
||||
expect(viewFactory.getViewDefault).toHaveBeenCalledTimes(2);
|
||||
expect(api.getIssueManager().trigger).toHaveBeenCalledWith('view_incompatible', {
|
||||
error,
|
||||
});
|
||||
});
|
||||
@@ -430,13 +431,13 @@ describe('should handle exceptions', () => {
|
||||
await manager.setViewDefaultWithNewQuery();
|
||||
|
||||
expect(manager.hasView()).toBeTruthy();
|
||||
expect(viewFactory.getViewDefault).toBeCalledWith(
|
||||
expect(viewFactory.getViewDefault).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ baseView: null, failSafe: true }),
|
||||
);
|
||||
expect(api.getIssueManager().trigger).toBeCalledWith('view_incompatible', {
|
||||
expect(api.getIssueManager().trigger).toHaveBeenCalledWith('view_incompatible', {
|
||||
error,
|
||||
});
|
||||
expect(api.getNotificationManager().setNotification).not.toBeCalled();
|
||||
expect(api.getNotificationManager().setNotification).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not retry with failSafe when existing view in async calls', async () => {
|
||||
@@ -455,8 +456,8 @@ describe('should handle exceptions', () => {
|
||||
await manager.setViewDefaultWithNewQuery();
|
||||
|
||||
expect(manager.getView()).not.toBeNull();
|
||||
expect(viewFactory.getViewDefault).toBeCalledTimes(2);
|
||||
expect(api.getIssueManager().trigger).toBeCalledWith('view_incompatible', {
|
||||
expect(viewFactory.getViewDefault).toHaveBeenCalledTimes(2);
|
||||
expect(api.getIssueManager().trigger).toHaveBeenCalledWith('view_incompatible', {
|
||||
error,
|
||||
});
|
||||
});
|
||||
@@ -469,7 +470,7 @@ describe('should handle exceptions', () => {
|
||||
const manager = new ViewManager(api, { viewFactory });
|
||||
manager.setViewDefault();
|
||||
|
||||
expect(api.getIssueManager().reset).toBeCalledWith('view_incompatible');
|
||||
expect(api.getIssueManager().reset).toHaveBeenCalledWith('view_incompatible');
|
||||
});
|
||||
|
||||
it('should return null when failSafe view factory also throws', () => {
|
||||
@@ -483,7 +484,7 @@ describe('should handle exceptions', () => {
|
||||
manager.setViewDefault();
|
||||
|
||||
expect(manager.hasView()).toBeFalsy();
|
||||
expect(viewFactory.getViewDefault).toBeCalledTimes(2);
|
||||
expect(viewFactory.getViewDefault).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
it('should handle viewQueryExecutor exceptions in async calls', async () => {
|
||||
@@ -505,7 +506,7 @@ describe('should handle exceptions', () => {
|
||||
expect(manager.hasView()).toBeTruthy();
|
||||
|
||||
// But an error will also be generated.
|
||||
expect(api.getIssueManager().trigger).toBeCalledWith(
|
||||
expect(api.getIssueManager().trigger).toHaveBeenCalledWith(
|
||||
'media_query',
|
||||
expect.objectContaining({ error }),
|
||||
);
|
||||
@@ -524,7 +525,7 @@ describe('should handle exceptions', () => {
|
||||
const manager = new ViewManager(api, { viewFactory });
|
||||
manager.setViewByParameters();
|
||||
|
||||
expect(api.getIssueManager().reset).toBeCalledWith('media_query');
|
||||
expect(api.getIssueManager().reset).toHaveBeenCalledWith('media_query');
|
||||
});
|
||||
|
||||
it('should tolerate the view being reset during a failing async query', async () => {
|
||||
@@ -550,7 +551,7 @@ describe('should handle exceptions', () => {
|
||||
await manager.setViewDefaultWithNewQuery();
|
||||
|
||||
expect(manager.getView()).toBeNull();
|
||||
expect(api.getIssueManager().trigger).toBeCalledWith(
|
||||
expect(api.getIssueManager().trigger).toHaveBeenCalledWith(
|
||||
'media_query',
|
||||
expect.objectContaining({ error }),
|
||||
);
|
||||
@@ -572,7 +573,7 @@ describe('should handle exceptions', () => {
|
||||
|
||||
// Reset is called twice: once at dispatch (supersedes any prior error)
|
||||
// and once after success (clears on confirmed success).
|
||||
expect(api.getIssueManager().reset).toBeCalledWith('media_query');
|
||||
expect(api.getIssueManager().reset).toHaveBeenCalledWith('media_query');
|
||||
expect(
|
||||
vi
|
||||
.mocked(api.getIssueManager().reset)
|
||||
@@ -598,8 +599,8 @@ describe('should handle exceptions', () => {
|
||||
// A retry re-runs the same failing query, so the existing error must not be
|
||||
// cleared up front (it would blink away and back); the failure just
|
||||
// re-triggers it.
|
||||
expect(api.getIssueManager().reset).not.toBeCalledWith('media_query');
|
||||
expect(api.getIssueManager().trigger).toBeCalledWith(
|
||||
expect(api.getIssueManager().reset).not.toHaveBeenCalledWith('media_query');
|
||||
expect(api.getIssueManager().trigger).toHaveBeenCalledWith(
|
||||
'media_query',
|
||||
expect.objectContaining({ error }),
|
||||
);
|
||||
@@ -819,7 +820,7 @@ describe('should apply async view modifications', () => {
|
||||
expect(manager.getView()?.query).toBe(query);
|
||||
expect(manager.getView()?.queryResults).toBe(queryResults);
|
||||
expect(manager.getView()?.context?.loading?.query).toBeUndefined();
|
||||
expect(api.getIssueManager().reset).toBeCalledWith('media_query');
|
||||
expect(api.getIssueManager().reset).toHaveBeenCalledWith('media_query');
|
||||
});
|
||||
|
||||
it('should not apply modifications if there is a major media change', async () => {
|
||||
|
||||
@@ -10,17 +10,17 @@ import { QuerySource } from '../../../src/query-source';
|
||||
import { UnifiedQuery } from '../../../src/view/unified-query';
|
||||
import { View } from '../../../src/view/view';
|
||||
import {
|
||||
createCameraConfig,
|
||||
createCameraManager,
|
||||
createCapabilities,
|
||||
createCardAPI,
|
||||
createStore,
|
||||
} from '../../camera-manager/test-utils';
|
||||
import {
|
||||
createCameraConfig,
|
||||
createConfig,
|
||||
createPerformanceConfig,
|
||||
createStore,
|
||||
createView,
|
||||
isEventQuery,
|
||||
TestViewMedia,
|
||||
} from '../../test-utils';
|
||||
} from '../../config/test-utils';
|
||||
import { createCardAPI } from '../../test-utils';
|
||||
import { createView, isEventQuery, TestViewMedia } from '../../view/test-utils';
|
||||
import { createPopulatedAPI } from './test-utils';
|
||||
|
||||
describe('ViewQueryExecutor', () => {
|
||||
|
||||
Reference in New Issue
Block a user