[8.x] [Synthetics] Fix flaky tests for alerting default !! (#203220) (#203232)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Synthetics] Fix flaky tests for alerting default !!
(#203220)](https://github.com/elastic/kibana/pull/203220)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2024-12-06T11:54:07Z","message":"[Synthetics]
Fix flaky tests for alerting default !! (#203220)\n\n##
Summary\r\n\r\nFix flaky tests for alerting default, removed unecessary
code.\r\n\r\nI tested locally 30 times and it has been fixed
now.","sha":"dc77e8c149abc7a0bc2d9d3c65db0533ce45e4ff","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"title":"[Synthetics]
Fix flaky tests for alerting default
!!","number":203220,"url":"https://github.com/elastic/kibana/pull/203220","mergeCommit":{"message":"[Synthetics]
Fix flaky tests for alerting default !! (#203220)\n\n##
Summary\r\n\r\nFix flaky tests for alerting default, removed unecessary
code.\r\n\r\nI tested locally 30 times and it has been fixed
now.","sha":"dc77e8c149abc7a0bc2d9d3c65db0533ce45e4ff"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203220","number":203220,"mergeCommit":{"message":"[Synthetics]
Fix flaky tests for alerting default !! (#203220)\n\n##
Summary\r\n\r\nFix flaky tests for alerting default, removed unecessary
code.\r\n\r\nI tested locally 30 times and it has been fixed
now.","sha":"dc77e8c149abc7a0bc2d9d3c65db0533ce45e4ff"}}]}] BACKPORT-->

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
This commit is contained in:
Kibana Machine 2024-12-07 00:47:02 +11:00 committed by GitHub
parent b5dcebba76
commit 9cdf4d21a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"]');