Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Scenario(
await dashboardPage.expandEachDashboardRow();
await dashboardPage.verifyMetricsExistence(dashboardPage.postgresqlInstanceSummaryDashboard.metrics);
await dashboardPage.verifyThereAreNoGraphsWithoutData(2);
const logLocation = await I.verifyCommand(`docker exec ${container_name} find / -name pmm-agent.log`);
const logLocation = await I.verifyCommand(`docker exec ${container_name} find / -path /proc -prune -o -name pmm-agent.log -print`);
const log = await I.verifyCommand(`docker exec ${container_name} cat ${logLocation}`);

I.assertFalse(
Expand Down Expand Up @@ -641,7 +641,7 @@ Scenario(
await I.verifyCommand(`docker exec ${container_name} true > pmm-agent.log`);
await I.verifyCommand(`docker exec ${container_name} pmm-admin list | grep "postgresql_pgstatmonitor_agent" | grep "Running"`);
I.wait(defaultValue);
const logLocation = await I.verifyCommand(`docker exec ${container_name} find / -name pmm-agent.log`);
const logLocation = await I.verifyCommand(`docker exec ${container_name} find / -path /proc -prune -o -name pmm-agent.log -print`);
let log = await I.verifyCommand(`docker exec ${container_name} tail -n100 ${logLocation}`);

assert.ok(
Expand Down
12 changes: 6 additions & 6 deletions e2e_tests/pages/dashboards/dashboards.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import pmmTest from '@fixtures/pmmTest';
import OperatingSystemDashboards, { OperatingSystemDashboardsType } from '@pages/dashboards/operating-system';

const panelNoDataMarkers = ['None', 'No data', 'NO DATA', 'No Data', 'N/A'];
// A viz legend entry reading "N/A" is a series name — a state timeline maps its
// null state to that text — so it must not count as Grafana's own no-data indicator.
const noDataMarkerXPath =
'//*[(text()="No data") or (text()="NO DATA") or (text()="N/A") or (text()="-") or (text() = "No Data") or (@data-testid="data-testid Panel data error message")][not(ancestor-or-self::*[starts-with(@data-testid, "data-testid VizLegend series")])]';
const hasKnownNoDataMarker = (panelText: string) =>
panelNoDataMarkers.some((marker) => panelText.includes(marker)) ||
panelText
Expand Down Expand Up @@ -47,12 +51,8 @@ export default class Dashboards extends BasePage {
loadingBar: this.grafanaIframe().getByLabel('Panel loading bar'),
loadingIndicator: this.grafanaIframe().getByLabel('data-testid Loading indicator', { exact: true }),
loadingText: this.grafanaIframe().getByText('Loading plugin panel...', { exact: true }),
noDataPanel: this.page.locator(
'//*[(text()="No data") or (text()="NO DATA") or (text()="N/A") or (text()="-") or (text() = "No Data") or (@data-testid="data-testid Panel data error message")]',
),
noDataPanelName: this.grafanaIframe().locator(
'//*[(text()="No data") or (text()="NO DATA") or (text()="N/A") or (text()="-") or (text() = "No Data") or (@data-testid="data-testid Panel data error message")]//ancestor::section//h2',
),
noDataPanel: this.page.locator(noDataMarkerXPath),
noDataPanelName: this.grafanaIframe().locator(`${noDataMarkerXPath}//ancestor::section//h2`),
panelName: this.grafanaIframe().locator('//section[contains(@data-testid, "Panel header")]//h2'),
qanGrid: this.grafanaIframe().locator('.query-analytics-grid'),
qanTableLoading: this.grafanaIframe().getByTestId('table-loading'),
Expand Down
Loading