mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: New EmbeddedDashboard runtime component (#78916)
* Embedding dashboards exploratino * Update * Update * Added e2e test * Update * initial state, and onStateChange, only explore panel menu action and other fixes and tests * fix e2e spec * Fix url * fixing test
This commit is contained in:
24
e2e/dashboards-suite/embedded-dashboard.spec.ts
Normal file
24
e2e/dashboards-suite/embedded-dashboard.spec.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { e2e } from '../utils';
|
||||
import { fromBaseUrl } from '../utils/support/url';
|
||||
|
||||
describe('Embedded dashboard', function () {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
});
|
||||
|
||||
it('open test page', function () {
|
||||
cy.visit(fromBaseUrl('/dashboards/embedding-test'));
|
||||
|
||||
// Verify pie charts are rendered
|
||||
cy.get(
|
||||
`[data-viz-panel-key="panel-11"] [data-testid^="${selectors.components.Panels.Visualization.PieChart.svgSlice}"]`
|
||||
).should('have.length', 5);
|
||||
|
||||
// Verify no url sync
|
||||
e2e.components.TimePicker.openButton().click();
|
||||
cy.get('label:contains("Last 1 hour")').click();
|
||||
cy.url().should('eq', fromBaseUrl('/dashboards/embedding-test'));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user