From db418fff7925cb0cff52e6cdc3d2ed61426a2927 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 17 Oct 2023 05:29:56 -0400 Subject: [PATCH] [8.11] [Synthetics] Unskip test now mode e2e test (#168932) (#169022) # Backport This will backport the following commits from `main` to `8.11`: - [[Synthetics] Unskip test now mode e2e test (#168932)](https://github.com/elastic/kibana/pull/168932) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Shahzad --- 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} );