grafana/public/app/plugins/panel/bargauge/BarGaugeMigrations.test.ts
Dominik Prokop 9b7748ec13
Chore: Reorg packages (#20111)
Primarily- moving majority of the types and utils from @grafana/ui to @grafana/data

* Move types from grafana-ui to grafana-data

* Move valueFormats to grafana-data

* Move utils from grafana-ui to grafana-data

* Update imports in grafana-ui

* revert data's tsconfig change

* Update imports in grafana-runtime

* Fix import paths in grafana-ui

* Move rxjs to devDeps

* Core import updates batch 1

* Import updates batch 2

* Imports fix batch 3

* Imports fixes batch i don't know

* Fix imorts in grafana-toolkit

* Fix imports after master merge
2019-10-31 10:48:05 +01:00

51 lines
1.1 KiB
TypeScript

import { PanelModel } from '@grafana/data';
import { barGaugePanelMigrationHandler } from './BarGaugeMigrations';
describe('BarGauge Panel Migrations', () => {
it('from 6.2', () => {
const panel = {
id: 7,
links: [],
options: {
displayMode: 'lcd',
fieldOptions: {
calcs: ['mean'],
defaults: {
decimals: null,
max: -22,
min: 33,
unit: 'watt',
},
mappings: [],
override: {},
thresholds: [
{
color: 'green',
index: 0,
value: null,
},
{
color: 'orange',
index: 1,
value: 40,
},
{
color: 'red',
index: 2,
value: 80,
},
],
values: false,
},
orientation: 'vertical',
},
pluginVersion: '6.2.0',
targets: [],
title: 'Usage',
type: 'bargauge',
} as PanelModel;
expect(barGaugePanelMigrationHandler(panel)).toMatchSnapshot();
});
});