|
|
@@ -1,5 +1,4 @@
|
|
|
-import _ from 'lodash';
|
|
|
-import { PanelModel } from '../state/PanelModel';
|
|
|
+import { PanelModel } from './PanelModel';
|
|
|
|
|
|
describe('PanelModel', () => {
|
|
|
describe('when creating new panel model', () => {
|
|
|
@@ -66,7 +65,7 @@ describe('PanelModel', () => {
|
|
|
|
|
|
describe('when changing panel type', () => {
|
|
|
beforeEach(() => {
|
|
|
- model.changeType('graph', true);
|
|
|
+ model.changeType('graph');
|
|
|
model.alert = { id: 2 };
|
|
|
});
|
|
|
|
|
|
@@ -75,12 +74,12 @@ describe('PanelModel', () => {
|
|
|
});
|
|
|
|
|
|
it('should restore table properties when changing back', () => {
|
|
|
- model.changeType('table', true);
|
|
|
+ model.changeType('table');
|
|
|
expect(model.showColumns).toBe(true);
|
|
|
});
|
|
|
|
|
|
it('should remove alert rule when changing type that does not support it', () => {
|
|
|
- model.changeType('table', true);
|
|
|
+ model.changeType('table');
|
|
|
expect(model.alert).toBe(undefined);
|
|
|
});
|
|
|
});
|