* Dynamic dashboards sidebar wip * Progress * Outline in view mode cannot change name * Only one pane at a time * Adding starbutton and custom precence * undo / redo working * Progress * Update * Progress * Update * Public badge, provisining badge * playlist stop * Update * some initial unit tests * Fix export tooltip * Close pane when leaving edit mode if pane is an element * Update * e2e fixes * fixing e2e * Fix lint suppressions * e2e fixes * fixing more e2e * fixing e2e * fix e2e * e2e fixes * Fixinfg e2e * fixing e2e
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import { test, expect } from '@grafana/plugin-e2e';
|
|
|
|
test.use({
|
|
featureToggles: {
|
|
kubernetesDashboards: true,
|
|
dashboardNewLayouts: true,
|
|
dashboardUndoRedo: true,
|
|
groupByVariable: true,
|
|
},
|
|
});
|
|
|
|
const PAGE_UNDER_TEST = 'edediimbjhdz4b/a-tall-dashboard';
|
|
|
|
test.describe(
|
|
'Dashboard Outline',
|
|
{
|
|
tag: ['@dashboards'],
|
|
},
|
|
() => {
|
|
test('can use dashboard outline', async ({ gotoDashboardPage, selectors, page }) => {
|
|
const dashboardPage = await gotoDashboardPage({ uid: PAGE_UNDER_TEST });
|
|
|
|
await dashboardPage.getByGrafanaSelector(selectors.components.NavToolbar.editDashboard.editButton).click();
|
|
await dashboardPage.getByGrafanaSelector(selectors.pages.Dashboard.Sidebar.outlineButton).click();
|
|
|
|
// Should be able to click Variables item in outline to see add variable button
|
|
await dashboardPage.getByGrafanaSelector(selectors.components.PanelEditor.Outline.item('Variables')).click();
|
|
await expect(
|
|
dashboardPage.getByGrafanaSelector(selectors.components.PanelEditor.ElementEditPane.addVariableButton)
|
|
).toBeVisible();
|
|
|
|
await dashboardPage.getByGrafanaSelector(selectors.pages.Dashboard.Sidebar.outlineButton).click();
|
|
|
|
// Clicking a panel should scroll that panel in view
|
|
await expect(page.getByText('Dashboard panel 48')).toBeHidden();
|
|
await dashboardPage.getByGrafanaSelector(selectors.components.PanelEditor.Outline.item('Panel #48')).click();
|
|
await expect(page.getByText('Dashboard panel 48')).toBeVisible();
|
|
});
|
|
}
|
|
);
|