From cbf7982887decc527455dd8f64477813e8ea2672 Mon Sep 17 00:00:00 2001 From: Abdul Wahab Zahid Date: Tue, 22 Oct 2024 15:11:08 +0200 Subject: [PATCH] Make sort integration test resilient to network delays. (#196516) Fixes https://github.com/elastic/kibana/issues/182017 ## Summary The PR tries to address the flakiness from the test. Co-authored-by: Elastic Machine --- .../data_source_selector.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/data_source_selector.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/data_source_selector.ts index f571fe4e0e462..ba12ebc153ca8 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/data_source_selector.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/data_source_selector.ts @@ -214,25 +214,25 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should sort the integrations list by the clicked sorting option', async () => { // Test ascending order - await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc'); - await retry.try(async () => { + await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc'); + await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc'); const { integrations } = await PageObjects.observabilityLogsExplorer.getIntegrations(); expect(integrations).to.eql(initialPackagesTexts); }); // Test descending order - await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc'); - await retry.try(async () => { + await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc'); + await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc'); const { integrations } = await PageObjects.observabilityLogsExplorer.getIntegrations(); expect(integrations).to.eql(initialPackagesTexts.slice().reverse()); }); // Test back ascending order - await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc'); - await retry.try(async () => { + await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc'); + await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc'); const { integrations } = await PageObjects.observabilityLogsExplorer.getIntegrations(); expect(integrations).to.eql(initialPackagesTexts); });