From 7bb309f4680a28ea6c9e7b98bc95becb1fa7eb86 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 16 Aug 2026 02:22:17 +0000 Subject: [PATCH] Fix QAN search page-object race with debounced search The QAN Overview search became search-as-you-type (debounced) in PMM-14848 (percona/pmm#5537). searchByValue()/click() cleared the field before clicking it, which kicks off an empty-search reload of the Overview panel; the panel unmounts the search input while it reloads, so the immediately following I.click() -- which asserts existence without waiting for it -- fails with ElementNotFound (PMM-T1061, PMM-T1790, and any @qan spec that searches). Click the already-loaded grid first and let I.fillField clear+type (Playwright fill clears the field), then wait for the panel to settle. Apply the same settle to clearSearchValue(). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Dtd6vCp2nyWfx2T8VdfnJj Signed-off-by: Claude --- .../pages/components/queryAnalytics/queryAnalyticsData.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codeceptjs-e2e/tests/pages/components/queryAnalytics/queryAnalyticsData.js b/codeceptjs-e2e/tests/pages/components/queryAnalytics/queryAnalyticsData.js index 7113a211b..92000cbb9 100644 --- a/codeceptjs-e2e/tests/pages/components/queryAnalytics/queryAnalyticsData.js +++ b/codeceptjs-e2e/tests/pages/components/queryAnalytics/queryAnalyticsData.js @@ -154,17 +154,16 @@ class QueryAnalyticsData { I.waitForVisible(this.elements.queryRow(0), 30); I.waitForVisible(this.fields.searchBy, 30); I.wait(1); - I.clearField(this.fields.searchBy); I.click(this.fields.searchBy); I.fillField(this.fields.searchBy, value); I.pressKey('Enter'); + queryAnalyticsPage.waitForLoaded(); } click(value) { I.waitForVisible(this.elements.queryRow(0), 30); I.waitForVisible(this.fields.searchBy, 30); I.wait(1); - I.clearField(this.fields.searchBy); I.click(this.fields.searchBy); I.fillField(this.fields.searchBy, value); } @@ -179,6 +178,7 @@ class QueryAnalyticsData { I.click(this.fields.searchBy); I.wait(1); I.clearField(this.fields.searchBy); + queryAnalyticsPage.waitForLoaded(); } async getCountOfItems() {