From 07a513056d70a2ac691ea3be6e55f31f7baef967 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Fri, 6 Dec 2024 12:54:07 +0100 Subject: [PATCH] [Synthetics] Fix flaky tests for alerting default !! (#203220) ## Summary Fix flaky tests for alerting default, removed unecessary code. I tested locally 30 times and it has been fixed now. --- .../e2e/synthetics/journeys/alerting_default.journey.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts index d2e495e0cc17a..43084f0e54d7b 100644 --- a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts +++ b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/alerting_default.journey.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { journey, step, expect, before, after } from '@elastic/synthetics'; +import { journey, step, before, after } from '@elastic/synthetics'; import { byTestId } from '../../helpers/utils'; import { syntheticsAppPageProvider } from '../page_objects/synthetics_app'; import { cleanSettings } from './services/settings'; @@ -29,13 +29,10 @@ journey('AlertingDefaults', async ({ page, params }) => { step('Go to Settings page', async () => { await page.click('[aria-label="Toggle primary navigation"]'); await page.click('text=Synthetics'); - await page.click('text=Settings'); + await page.getByTestId('settings-page-link').click(); }); step('Click text=Synthetics', async () => { - expect(page.url()).toBe('http://localhost:5620/app/synthetics/settings/alerting'); - await page.click('.euiComboBox__inputWrap'); - await page.click("text=There aren't any options available"); await page.click('button:has-text("Add connector")'); await page.click('p:has-text("Slack")'); await page.click('input[type="text"]');