diff --git a/tests/qa-integration/pmm_ps_integration_test.js b/tests/qa-integration/pmm_ps_integration_test.js index a8395c077..8986b6f69 100644 --- a/tests/qa-integration/pmm_ps_integration_test.js +++ b/tests/qa-integration/pmm_ps_integration_test.js @@ -172,8 +172,15 @@ Scenario( I.amOnPage(I.buildUrlWithParams(queryAnalyticsPage.url, { from: 'now-1h', refresh: '5s' })); queryAnalyticsPage.waitForLoaded(); - await queryAnalyticsPage.filters.selectFilter(dbName, 120000); + await queryAnalyticsPage.filters.selectFilter(dbName); queryAnalyticsPage.waitForLoaded(); - I.waitForText('16', 240, queryAnalyticsPage.data.elements.totalItems); + for (let i = 0; i <= 24; i++) { + const countOfQueries = parseInt((await I.grabTextFrom(queryAnalyticsPage.data.elements.totalItems)).split('of ')[1], 10); + + I.wait(10); + if (countOfQueries === 17) continue; + + if (i === 24) assert.equal(countOfQueries, 17, 'Count of queries is incorrect'); + } }, ).retry(1);