From b3e66b1e0abfbf10e51bd77abcdf2bb7e3c1e622 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Mon, 16 Oct 2023 21:04:22 +0200 Subject: [PATCH] [Synthetics] Unskip test now mode e2e test (#168932) --- x-pack/plugins/synthetics/e2e/synthetics/journeys/index.ts | 2 +- .../e2e/synthetics/journeys/test_now_mode.journey.ts | 4 ++-- .../common/monitor_test_result/step_duration_text.tsx | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/synthetics/e2e/synthetics/journeys/index.ts b/x-pack/plugins/synthetics/e2e/synthetics/journeys/index.ts index 63f460ec56771..40418a55e8d8e 100644 --- a/x-pack/plugins/synthetics/e2e/synthetics/journeys/index.ts +++ b/x-pack/plugins/synthetics/e2e/synthetics/journeys/index.ts @@ -18,7 +18,7 @@ export * from './alerting_default.journey'; export * from './global_parameters.journey'; export * from './detail_flyout'; // export * from './alert_rules/default_status_alert.journey'; -// export * from './test_now_mode.journey'; +export * from './test_now_mode.journey'; // export * from './data_retention.journey'; export * from './monitor_details_page/monitor_summary.journey'; export * from './test_run_details.journey'; diff --git a/x-pack/plugins/synthetics/e2e/synthetics/journeys/test_now_mode.journey.ts b/x-pack/plugins/synthetics/e2e/synthetics/journeys/test_now_mode.journey.ts index 3c99b173f781f..9df533b4df2ed 100644 --- a/x-pack/plugins/synthetics/e2e/synthetics/journeys/test_now_mode.journey.ts +++ b/x-pack/plugins/synthetics/e2e/synthetics/journeys/test_now_mode.journey.ts @@ -31,7 +31,7 @@ journey(`TestNowMode`, async ({ page, params }) => { if ( evt.resourceType() === 'fetch' && (evt.url().includes('service/monitors/trigger/') || - evt.url().includes('uptime/service/monitors/run_once')) + evt.url().includes('synthetics/service/monitors/run_once')) ) { evt .response() @@ -139,7 +139,7 @@ journey(`TestNowMode`, async ({ page, params }) => { await page.waitForSelector( '.euiTableRowCell--hideForMobile :has-text("Go to https://www.google.com")' ); - await page.waitForSelector('.euiTableRowCell--hideForMobile :has-text("1.42 s")'); + expect(await page.getByTestId('stepDurationText1').first()).toHaveText('1.4 sec'); await page.waitForSelector('text=Complete'); }); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/step_duration_text.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/step_duration_text.tsx index 68f5d919f90e3..7bee1f0d01887 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/step_duration_text.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/step_duration_text.tsx @@ -29,7 +29,11 @@ export const StepDurationText = ({ step }: { step: JourneyStep }) => { }, [euiTheme.colors, step.synthetics.step?.duration?.us, step.synthetics.step?.status]); return ( - + {stepDuration.text} );