From ed636a2e6c82a0f8272f5e6a7ae8f14a986f78a9 Mon Sep 17 00:00:00 2001 From: Noel De Martin <noel@moodle.com> Date: Mon, 4 Oct 2021 17:14:45 +0200 Subject: [PATCH] MOBILE-3833 e2e: Expose ngZone service --- src/core/initializers/prepare-automated-tests.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/initializers/prepare-automated-tests.ts b/src/core/initializers/prepare-automated-tests.ts index 46531f44f..f8e60a42d 100644 --- a/src/core/initializers/prepare-automated-tests.ts +++ b/src/core/initializers/prepare-automated-tests.ts @@ -12,17 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ApplicationRef } from '@angular/core'; +import { ApplicationRef, NgZone as NgZoneService } from '@angular/core'; import { CorePushNotifications, CorePushNotificationsProvider } from '@features/pushnotifications/services/pushnotifications'; import { CoreApp, CoreAppProvider } from '@services/app'; import { CoreCronDelegate, CoreCronDelegateService } from '@services/cron'; import { CoreCustomURLSchemes, CoreCustomURLSchemesProvider } from '@services/urlschemes'; -import { Application } from '@singletons'; +import { Application, NgZone } from '@singletons'; type AutomatedTestsWindow = Window & { appRef?: ApplicationRef; appProvider?: CoreAppProvider; cronProvider?: CoreCronDelegateService; + ngZone?: NgZoneService; pushNotifications?: CorePushNotificationsProvider; urlSchemes?: CoreCustomURLSchemesProvider; }; @@ -31,6 +32,7 @@ function initializeAutomatedTestsWindow(window: AutomatedTestsWindow) { window.appRef = Application.instance; window.appProvider = CoreApp.instance; window.cronProvider = CoreCronDelegate.instance; + window.ngZone = NgZone.instance; window.pushNotifications = CorePushNotifications.instance; window.urlSchemes = CoreCustomURLSchemes.instance; }