From 562bc2f52174a7ebe0ecd1094f6606f15d94b8d5 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 22 Jan 2024 14:50:12 +0100 Subject: [PATCH] fix deprecation warnings --- packages/kbn-journeys/journey/journey_ftr_harness.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/kbn-journeys/journey/journey_ftr_harness.ts b/packages/kbn-journeys/journey/journey_ftr_harness.ts index a1e9843c6b1d0..7becb99f3970b 100644 --- a/packages/kbn-journeys/journey/journey_ftr_harness.ts +++ b/packages/kbn-journeys/journey/journey_ftr_harness.ts @@ -333,8 +333,11 @@ export class JourneyFtrHarness { private telemetryTrackerCount = 0; private trackTelemetryRequests(page: Page) { - const requestSuccess$ = Rx.fromEvent(page, 'requestfinished'); - const request$ = Rx.fromEvent(page, 'request').pipe( + const requestSuccess$ = Rx.fromEvent( + page, + 'requestfinished' + ) as Rx.Observable; + const request$ = (Rx.fromEvent(page, 'request') as Rx.Observable).pipe( Rx.takeUntil( this.pageTeardown$.pipe( Rx.first((p) => p === page),