Files
grafana/public/app/plugins/panel/timeseries/__snapshots__/migrations.test.ts.snap
renovate[bot] e84a01e870 Update jest monorepo to v29 (#58261)
* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-24 14:00:41 +00:00

685 lines
13 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Graph Migrations legend with multiple values 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto",
"drawStyle": "line",
"fillOpacity": 50,
"lineInterpolation": "stepAfter",
"lineWidth": 5,
"showPoints": "never",
"spanNulls": false,
},
"nullValueMode": "null",
"unit": "short",
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "A-series",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed",
},
},
],
},
],
},
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"sum",
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations legend with single value 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "points",
"spanNulls": false,
},
},
"overrides": [],
},
"options": {
"legend": {
"calcs": [
"sum",
],
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "single",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations legend without values 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "points",
"spanNulls": false,
},
},
"overrides": [],
},
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "single",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations preserves colors from series overrides 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden",
"drawStyle": "line",
"fillOpacity": 60,
"gradientMode": "opacity",
"lineInterpolation": "stepAfter",
"lineWidth": 1,
"showPoints": "never",
"spanNulls": false,
},
"nullValueMode": "null",
"unit": "short",
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "A-series",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "rgba(165, 72, 170, 0.77)",
"mode": "fixed",
},
},
],
},
{
"matcher": {
"id": "byName",
"options": "B-series",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "rgba(16, 72, 170, 0.77)",
"mode": "fixed",
},
},
],
},
],
},
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min",
"sum",
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations preserves series overrides using a regex alias 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden",
"drawStyle": "line",
"fillOpacity": 60,
"gradientMode": "opacity",
"lineInterpolation": "stepAfter",
"lineWidth": 1,
"showPoints": "never",
"spanNulls": false,
},
"nullValueMode": "null",
"unit": "short",
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": "/^A-/",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "rgba(165, 72, 170, 0.77)",
"mode": "fixed",
},
},
],
},
{
"matcher": {
"id": "byRegexp",
"options": "/.*Status: 2[0-9]+.*/i",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "rgba(16, 72, 170, 0.77)",
"mode": "fixed",
},
},
],
},
],
},
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min",
"sum",
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations simple bars 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "bars",
"fillOpacity": 100,
"showPoints": "never",
"spanNulls": false,
},
},
"overrides": [],
},
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "single",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations stacking groups 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto",
"drawStyle": "line",
"fillOpacity": 50,
"lineInterpolation": "stepAfter",
"lineWidth": 5,
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal",
},
},
"nullValueMode": "null",
"unit": "short",
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "A-series",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed",
},
},
],
},
{
"matcher": {
"id": "byName",
"options": "A-series",
},
"properties": [
{
"id": "custom.stacking",
"value": {
"group": "A",
"mode": "normal",
},
},
],
},
{
"matcher": {
"id": "byName",
"options": "B-series",
},
"properties": [
{
"id": "custom.stacking",
"value": {
"group": "A",
"mode": "normal",
},
},
],
},
],
},
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"sum",
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations stacking simple 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto",
"drawStyle": "line",
"fillOpacity": 50,
"lineInterpolation": "stepAfter",
"lineWidth": 5,
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal",
},
},
"nullValueMode": "null",
"unit": "short",
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "A-series",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed",
},
},
],
},
],
},
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"sum",
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations stairscase 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "hidden",
"drawStyle": "line",
"fillOpacity": 60,
"gradientMode": "opacity",
"lineInterpolation": "stepAfter",
"lineWidth": 1,
"showPoints": "never",
"spanNulls": false,
},
"displayName": "DISPLAY NAME",
"nullValueMode": "null",
"unit": "short",
},
"overrides": [],
},
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max",
"min",
"sum",
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations stepped line 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisPlacement": "auto",
"drawStyle": "line",
"fillOpacity": 50,
"lineInterpolation": "stepAfter",
"lineWidth": 5,
"showPoints": "never",
"spanNulls": false,
},
"nullValueMode": "null",
"unit": "short",
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "A-series",
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed",
},
},
],
},
],
},
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations transforms should preserve "constant" transform 1`] = `
{
"defaults": {
"custom": {
"drawStyle": "points",
"spanNulls": false,
},
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "out",
},
"properties": [
{
"id": "custom.transform",
"value": "constant",
},
],
},
],
}
`;
exports[`Graph Migrations transforms should preserve "negative-Y" transform 1`] = `
{
"defaults": {
"custom": {
"drawStyle": "points",
"spanNulls": false,
},
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "out",
},
"properties": [
{
"id": "custom.transform",
"value": "negative-Y",
},
],
},
],
}
`;
exports[`Graph Migrations twoYAxis 1`] = `
{
"alert": undefined,
"fieldConfig": {
"defaults": {
"custom": {
"axisLabel": "Y111",
"axisPlacement": "auto",
"drawStyle": "line",
"fillOpacity": 10,
"lineStyle": {
"dash": [
10,
10,
],
"fill": "dash",
},
"lineWidth": 1,
"scaleDistribution": {
"log": 10,
"type": "log",
},
"showPoints": "never",
"spanNulls": false,
},
"decimals": 3,
"max": 1000,
"min": 0,
"nullValueMode": "null",
"unit": "areaMI2",
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "B-series",
},
"properties": [
{
"id": "unit",
"value": "degree",
},
{
"id": "decimals",
"value": 2,
},
{
"id": "min",
"value": -10,
},
{
"id": "max",
"value": 25,
},
{
"id": "custom.axisLabel",
"value": "Y222",
},
{
"id": "custom.lineStyle",
"value": {
"dash": [
5,
8,
],
"fill": "dash",
},
},
],
},
],
},
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true,
},
"tooltip": {
"mode": "multi",
"sort": "none",
},
},
}
`;
exports[`Graph Migrations x axis should hide x axis 1`] = `
{
"defaults": {
"custom": {
"drawStyle": "points",
"spanNulls": false,
},
},
"overrides": [
{
"matcher": {
"id": "byType",
"options": "time",
},
"properties": [
{
"id": "custom.axisPlacement",
"value": "hidden",
},
],
},
],
}
`;