feat: Allow user generated notifications (#2401)

This commit is contained in:
Dermot Duffy
2026-03-07 20:47:24 -08:00
committed by GitHub
parent 1d81e03b04
commit 24c6b98948
53 changed files with 939 additions and 471 deletions
+22
View File
@@ -10,6 +10,7 @@ import {
createInternalCallbackAction,
createLogAction,
createMediaPlayerAction,
createNotificationAction,
createPerformAction,
createPTZAction,
createPTZControlsAction,
@@ -357,6 +358,27 @@ describe('createSetReviewAction', () => {
});
});
describe('createNotificationAction', () => {
it('should create notification action', () => {
const notification = { text: 'test' };
expect(createNotificationAction(notification)).toEqual({
action: 'fire-dom-event',
advanced_camera_card_action: 'notification',
notification,
});
});
it('should create notification action with cardID', () => {
const notification = { text: 'test' };
expect(createNotificationAction(notification, { cardID: 'card_id' })).toEqual({
action: 'fire-dom-event',
advanced_camera_card_action: 'notification',
notification,
card_id: 'card_id',
});
});
});
describe('getActionConfigGivenAction', () => {
const action = createViewAction('clips');