mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Live: Add dashboard E2E smoke test (#79880)
This commit is contained in:
parent
3bcde852ac
commit
b6d95889e1
16
e2e/dashboards-suite/dashboard-live-streaming.spec.ts
Normal file
16
e2e/dashboards-suite/dashboard-live-streaming.spec.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import testDashboard from '../dashboards/DashboardLiveTest.json';
|
||||
import { e2e } from '../utils';
|
||||
|
||||
describe('Dashboard Live streaming support', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
e2e.flows.importDashboard(testDashboard, 1000);
|
||||
});
|
||||
|
||||
it('Should receive streaming data', () => {
|
||||
e2e.flows.openDashboard({ uid: 'live-e2e-test' });
|
||||
cy.wait(1000);
|
||||
e2e.components.Panels.Panel.title('Live').should('exist');
|
||||
e2e.components.Panels.Visualization.Table.body().find('[role="row"]').should('have.length.at.least', 5);
|
||||
});
|
||||
});
|
107
e2e/dashboards/DashboardLiveTest.json
Normal file
107
e2e/dashboards/DashboardLiveTest.json
Normal file
@ -0,0 +1,107 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": ["sum"],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"channel": "plugin/testdata/random-20Hz-stream",
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"queryType": "measurements",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Live",
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 39,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "New dashboard",
|
||||
"version": 0,
|
||||
"uid": "live-e2e-test",
|
||||
"weekStart": ""
|
||||
}
|
Loading…
Reference in New Issue
Block a user