diff --git a/src/Umbraco.Web.UI.Client/src/core/services/notification/notification-handler.test.ts b/src/Umbraco.Web.UI.Client/src/core/services/notification/notification-handler.test.ts index 727430ebb9..31e47e56a8 100644 --- a/src/Umbraco.Web.UI.Client/src/core/services/notification/notification-handler.test.ts +++ b/src/Umbraco.Web.UI.Client/src/core/services/notification/notification-handler.test.ts @@ -6,7 +6,7 @@ import { UmbNotificationHandler } from './notification-handler'; import type { UmbNotificationDefaultData } from './layouts/default'; import type { UmbNotificationOptions } from '.'; -describe('UCPNotificationHandler', () => { +describe('UmbNotificationHandler', () => { let notificationHandler: UmbNotificationHandler; beforeEach(async () => { diff --git a/src/Umbraco.Web.UI.Client/src/core/services/notification/notifications.service.test.ts b/src/Umbraco.Web.UI.Client/src/core/services/notification/notification.service.test.ts similarity index 87% rename from src/Umbraco.Web.UI.Client/src/core/services/notification/notifications.service.test.ts rename to src/Umbraco.Web.UI.Client/src/core/services/notification/notification.service.test.ts index 8a9f5877a8..ddd0490067 100644 --- a/src/Umbraco.Web.UI.Client/src/core/services/notification/notifications.service.test.ts +++ b/src/Umbraco.Web.UI.Client/src/core/services/notification/notification.service.test.ts @@ -29,6 +29,7 @@ describe('UCPNotificationService', () => { describe('peek', () => { let peekNotificationHandler: UmbNotificationHandler | undefined = undefined; + let layoutElement: any; beforeEach(async () => { const peekOptions = { @@ -36,6 +37,7 @@ describe('UCPNotificationService', () => { }; peekNotificationHandler = notificationService.peek('positive', peekOptions); + layoutElement = peekNotificationHandler.element.querySelector('umb-notification-layout-default'); }); it('it sets notification color', () => { @@ -43,7 +45,7 @@ describe('UCPNotificationService', () => { }); it('should set peek data on the notification element', () => { - const data = peekNotificationHandler?.element.data; + const data = layoutElement.data; expect(data.headline).to.equal('Peek notification headline'); expect(data.message).to.equal('Peek notification message'); }); @@ -55,6 +57,7 @@ describe('UCPNotificationService', () => { describe('stay', () => { let stayNotificationHandler: UmbNotificationHandler | undefined = undefined; + let layoutElement: any; beforeEach(async () => { const stayOptions = { @@ -62,6 +65,7 @@ describe('UCPNotificationService', () => { }; stayNotificationHandler = notificationService.stay('danger', stayOptions); + layoutElement = stayNotificationHandler.element.querySelector('umb-notification-layout-default'); }); it('it sets notification color', () => { @@ -69,7 +73,7 @@ describe('UCPNotificationService', () => { }); it('should set stay data on the notification element', () => { - const data = stayNotificationHandler?.element.data; + const data = layoutElement?.data; expect(data.headline).to.equal('Stay notification headline'); expect(data.message).to.equal('Stay notification message'); });