fixed tests
This commit is contained in:
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
exports[`Render BarGauge with basic options should render 1`] = `
|
exports[`Render BarGauge with basic options should render 1`] = `
|
||||||
<div
|
<div
|
||||||
className="bar-gauge"
|
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
|
"display": "flex",
|
||||||
|
"flexDirection": "column",
|
||||||
"height": "300px",
|
"height": "300px",
|
||||||
|
"justifyContent": "flex-end",
|
||||||
"width": "300px",
|
"width": "300px",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import _ from 'lodash';
|
import { PanelModel } from './PanelModel';
|
||||||
import { PanelModel } from '../state/PanelModel';
|
|
||||||
|
|
||||||
describe('PanelModel', () => {
|
describe('PanelModel', () => {
|
||||||
describe('when creating new panel model', () => {
|
describe('when creating new panel model', () => {
|
||||||
@@ -66,7 +65,7 @@ describe('PanelModel', () => {
|
|||||||
|
|
||||||
describe('when changing panel type', () => {
|
describe('when changing panel type', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
model.changeType('graph', true);
|
model.changeType('graph');
|
||||||
model.alert = { id: 2 };
|
model.alert = { id: 2 };
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -75,12 +74,12 @@ describe('PanelModel', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should restore table properties when changing back', () => {
|
it('should restore table properties when changing back', () => {
|
||||||
model.changeType('table', true);
|
model.changeType('table');
|
||||||
expect(model.showColumns).toBe(true);
|
expect(model.showColumns).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should remove alert rule when changing type that does not support it', () => {
|
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);
|
expect(model.alert).toBe(undefined);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user