-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The configured datalink should update a dashboard variable, which is displayed in a text panel, by clicking on a feature of a data layer.
- Loading branch information
Showing
11 changed files
with
111 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
265 changes: 0 additions & 265 deletions
265
provisioning/dashboards/20240227_QET - PoC Copy-Data_links_example.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { test, expect, DashboardPage } from '@grafana/plugin-e2e'; | ||
import { WMS_ENDPOINT, HAR_FILEPATH, UPDATE_HAR } from './test_config'; | ||
import { Locator } from '@playwright/test'; | ||
import { update } from 'lodash'; | ||
// import { selectors} from '@playwright/test'; | ||
|
||
|
||
test('Should update the dashboard variable when clicking on map feature', async ({ | ||
gotoPanelEditPage, | ||
readProvisionedDashboard, | ||
gotoDashboardPage, | ||
selectors, | ||
context, | ||
page | ||
}) => { | ||
const dashboard = await readProvisionedDashboard({ fileName: 'dashboard_e2e.json' }); | ||
const dashboardPage = await gotoDashboardPage(dashboard); | ||
const geomapPanel = dashboardPage.getByGrafanaSelector("data-testid geomap-panel-container"); | ||
// geomapPanel.locator("canvas"); | ||
// const p = page.waitForTimeout(3000); | ||
// await p; | ||
const boundingBox = await geomapPanel.boundingBox(); | ||
await geomapPanel.click({ | ||
position: { | ||
x: boundingBox!.width / 2, | ||
y: boundingBox!.height / 2 | ||
} | ||
}); | ||
|
||
const dataLinkTextPanel = dashboardPage.getByGrafanaSelector("data-testid Panel header Datalink test"); | ||
// const p2 = page.waitForTimeout(3000); | ||
// await p2; | ||
await expect(dataLinkTextPanel).toContainText(new RegExp("Polygon feature")); | ||
|
||
}); |
Oops, something went wrong.