[Synthetics] Fix flakiness for overview flyout tests !! (#206401)

## Summary

 Fix flakiness for overview flyout tests !!
This commit is contained in:
Shahzad 2025-01-13 18:02:26 +01:00 committed by GitHub
parent 1bd8c97982
commit 1857cac070
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { expect, Page } from '@elastic/synthetics';
import { Page } from '@elastic/synthetics';
import { waitForLoadingToFinish } from '@kbn/ux-plugin/e2e/journeys/utils';
export function utilsPageProvider({ page }: { page: Page }) {
@ -19,7 +19,7 @@ export function utilsPageProvider({ page }: { page: Page }) {
async assertText({ text }: { text: string }) {
await page.waitForSelector(`text=${text}`);
expect(await page.$(`text=${text}`)).toBeTruthy();
await page.getByText(text).isVisible();
},
async fillByTestSubj(dataTestSubj: string, value: string) {

View file

@ -39,7 +39,7 @@ journey('TestMonitorDetailFlyout', async ({ page, params }) => {
});
step('open overview flyout', async () => {
await syntheticsApp.navigateToOverview();
await page.getByTestId('syntheticsMonitorOverviewTab').click();
await syntheticsApp.assertText({ text: monitorName });
await page.click(`[data-test-subj="${monitorName}-${locationId}-metric-item"]`);
const flyoutHeader = await page.waitForSelector('.euiFlyoutHeader');