From 3590ed1e48085ee037e2a8fe443a50f3e53cc811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 6 Dec 2023 13:52:04 +0100 Subject: [PATCH] fix notification context --- .../packages/core/notification/notification.context.test.ts | 3 ++- .../core/notification/stories/notification.stories.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.test.ts b/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.test.ts index 4df03c16dd..adf5fe6305 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.test.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.test.ts @@ -1,12 +1,13 @@ import { expect } from '@open-wc/testing'; import { UmbNotificationHandler, UmbNotificationContext } from './index.js'; +import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api'; describe('UmbNotificationContext', () => { let notificationContext: UmbNotificationContext; beforeEach(async () => { - notificationContext = new UmbNotificationContext(); + notificationContext = new UmbNotificationContext(new UmbControllerHostElement()); }); describe('Public API', () => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/notification.stories.ts b/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/notification.stories.ts index c8a9588ea9..2210177eda 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/notification.stories.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/notification/stories/notification.stories.ts @@ -9,7 +9,9 @@ export default { component: 'umb-notification-layout-default', decorators: [ (story) => - html` + html` new UmbNotificationContext(host)}> ${story()} `, ],