homehub/packages/homehub_app/tests/__fixtures__/dashboardsContext.js

24 lines
722 B
JavaScript
Raw Normal View History

2021-08-26 10:33:15 +00:00
import {DEFAULT_DASHBOARDS_CONTEXT} from '@bthlabs/homehub-core';
import {DashboardsFactory} from 'tests/__fixtures__/dashboards';
export const DashboardsContextFactory = () => {
return {
...DEFAULT_DASHBOARDS_CONTEXT,
currentDashboardId: 'testing',
dashboards: DashboardsFactory(),
nukeService: jasmine.createSpy(),
saveServiceCharacteristics: jasmine.createSpy(),
saveServiceLayout: jasmine.createSpy(),
addService: jasmine.createSpy(),
isLoading: false,
lastSaveTimestamp: null,
lastSaveError: null,
isSaving: false,
isWebSocketConnected: false,
setCurrentDashboardId: jasmine.createSpy(),
dashboardsHash: null,
addDashboard: jasmine.createSpy(),
};
};