fix notification context

This commit is contained in:
Niels Lyngsø
2023-12-06 13:52:04 +01:00
parent bcb1814525
commit 3590ed1e48
2 changed files with 5 additions and 2 deletions

View File

@@ -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', () => {

View File

@@ -9,7 +9,9 @@ export default {
component: 'umb-notification-layout-default',
decorators: [
(story) =>
html`<umb-context-provider key="UmbNotificationContext" .value=${new UmbNotificationContext()}>
html`<umb-context-provider
key="UmbNotificationContext"
.create=${(host: any) => new UmbNotificationContext(host)}>
${story()}
</umb-context-provider>`,
],