From 80e14ce7692c2ae14c0f5cff7858309f9e0cd643 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Wed, 17 Apr 2024 10:03:57 +0200 Subject: [PATCH] [Discover] Unskip serverless alerts tests (#180913) - Closes https://github.com/elastic/kibana/issues/180311 - Closes https://github.com/elastic/kibana/issues/180305 25x https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5693 25x more https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5698 Also going to close other tickets as these tests are a part of the same test suit and the flaky test runner finished green with all of them: - Closes https://github.com/elastic/kibana/issues/172365 - Closes https://github.com/elastic/kibana/issues/172366 - Closes https://github.com/elastic/kibana/issues/180100 - Closes https://github.com/elastic/kibana/issues/180101 --- .../discover/search_source_alert.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts b/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts index f1f71971c41ae..ace790cc15950 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts @@ -254,7 +254,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } await filterBar.addFilter({ field: 'rule_id', operation: 'is', value: ruleId }); - await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('results', async () => { + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + const alreadyHasData = await testSubjects.exists('docTable'); + + if (!alreadyHasData) { + await testSubjects.click('querySubmitButton'); + } + + return alreadyHasData; + }); const link = await getResultsLink(); await filterBar.removeFilter('rule_id'); // clear filter bar @@ -342,8 +354,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await titleElem.getAttribute('value')).to.equal(dataView); }; - // Failing: See https://github.com/elastic/kibana/issues/180311 - describe.skip('Search source Alert', () => { + describe('Search source Alert', () => { before(async () => { await security.testUser.setRoles(['discover_alert']); await PageObjects.svlCommonPage.loginAsAdmin();