triggers panel: tests for schema migration

This commit is contained in:
Alexander Zobnin
2017-12-03 12:31:56 +03:00
parent b214705052
commit 5359176f2a
17 changed files with 1345 additions and 976 deletions

View File

@@ -2,6 +2,8 @@
/* globals global: false */
import {JSDOM} from 'jsdom';
import System from 'systemjs';
import {PanelCtrl} from './panelStub';
// Mock Grafana modules that are not available outside of the core project
// Required for loading module.js
@@ -17,9 +19,12 @@ jest.mock('angular', () => {
};
}, {virtual: true});
let mockPanelCtrl = PanelCtrl;
jest.mock('app/plugins/sdk', () => {
return {
QueryCtrl: null
QueryCtrl: null,
loadPluginCss: () => {},
PanelCtrl: mockPanelCtrl
};
}, {virtual: true});
@@ -48,3 +53,4 @@ let dom = new JSDOM('<html><head><script></script></head><body></body></html>');
global.window = dom.window;
global.document = global.window.document;
global.Node = window.Node;
global.System = System;