fixed tests
This commit is contained in:
@@ -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",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user