fixed tests

This commit is contained in:
Peter Holmberg 2019-02-21 14:44:21 +01:00
parent 89883c2cf6
commit f3ff3c1aec
2 changed files with 7 additions and 6 deletions

View File

@ -2,10 +2,12 @@
exports[`Render BarGauge with basic options should render 1`] = `
<div
className="bar-gauge"
style={
Object {
"display": "flex",
"flexDirection": "column",
"height": "300px",
"justifyContent": "flex-end",
"width": "300px",
}
}

View File

@ -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);
});
});