diff --git a/codeceptjs-e2e/tests/qa-integration/pmm_pgsm_integration_test.js b/codeceptjs-e2e/tests/qa-integration/pmm_pgsm_integration_test.js index eb7a49dea..951da53ca 100644 --- a/codeceptjs-e2e/tests/qa-integration/pmm_pgsm_integration_test.js +++ b/codeceptjs-e2e/tests/qa-integration/pmm_pgsm_integration_test.js @@ -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( @@ -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( diff --git a/e2e_tests/pages/dashboards/dashboards.page.ts b/e2e_tests/pages/dashboards/dashboards.page.ts index b9dd227ea..84866eaf7 100644 --- a/e2e_tests/pages/dashboards/dashboards.page.ts +++ b/e2e_tests/pages/dashboards/dashboards.page.ts @@ -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 @@ -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'),