StateTimeline: Complete E2E tests and add simple StateTimelineTooltip unit tests (#112901)

* StateTimeline: E2E tests for basic rendering, no data, and tooltip interactions

* Add tests for StateTimelineTooltip sub-component

* Remove unused import from state-timeline.spec.ts

* updates from PR review
This commit is contained in:
Paul Marbach
2025-10-24 10:45:48 -04:00
committed by GitHub
parent f7eac7f7ba
commit 3f02f50cf9
9 changed files with 388 additions and 20 deletions
@@ -1069,6 +1069,74 @@
],
"title": "boolean values from data",
"type": "state-timeline"
},
{
"id": 15,
"type": "state-timeline",
"title": "no data",
"gridPos": {
"x": 18,
"y": 18,
"h": 9,
"w": 6
},
"fieldConfig": {
"defaults": {
"custom": {
"lineWidth": 0,
"fillOpacity": 70,
"spanNulls": false,
"insertNulls": false,
"hideFrom": {
"tooltip": false,
"viz": false,
"legend": false
},
"axisPlacement": "auto"
},
"color": {
"mode": "palette-classic"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
},
"fieldMinMax": false
},
"overrides": []
},
"pluginVersion": "12.3.0-pre",
"targets": [
{
"scenarioId": "random_walk",
"refId": "A",
"seriesCount": 0
}
],
"datasource": {
"type": "grafana-testdata-datasource"
},
"options": {
"mergeValues": true,
"showValue": "auto",
"alignValue": "center",
"rowHeight": 0.9,
"legend": {
"showLegend": true,
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none",
"hideZeros": false
}
}
}
],
"preload": false,
@@ -1092,4 +1160,4 @@
"title": "StateTimeline - Thresholds \u0026 Mappings",
"uid": "Kce7z9TVz",
"weekStart": ""
}
}