feat: Add timeline support for folder media (#2197)

- Closes #2106
This commit is contained in:
Dermot Duffy
2025-10-04 15:47:39 -07:00
committed by GitHub
parent 262e5f223f
commit 78dee9194f
34 changed files with 2261 additions and 1363 deletions
+14 -17
View File
@@ -5,7 +5,6 @@ import { ActionConfig } from '../../src/config/schema/actions/types.js';
import {
createCameraAction,
createDisplayModeAction,
createFoldersViewAction,
createGeneralAction,
createInternalCallbackAction,
createLogAction,
@@ -48,6 +47,20 @@ describe('createViewAction', () => {
card_id: 'card_id',
});
});
it.each([['folder' as const], ['folders' as const]])(
'%s',
(viewName: 'folder' | 'folders') => {
expect(
createViewAction(viewName, { folderID: 'folderID', cardID: 'card_id' }),
).toEqual({
action: 'fire-dom-event',
advanced_camera_card_action: viewName,
card_id: 'card_id',
folder: 'folderID',
});
},
);
});
describe('createCameraAction', () => {
@@ -63,22 +76,6 @@ describe('createCameraAction', () => {
});
});
describe('createFolderAction', () => {
it.each([['folder' as const], ['folders' as const]])(
'%s',
(viewName: 'folder' | 'folders') => {
expect(
createFoldersViewAction(viewName, { folderID: 'folderID', cardID: 'card_id' }),
).toEqual({
action: 'fire-dom-event',
advanced_camera_card_action: viewName,
card_id: 'card_id',
folder: 'folderID',
});
},
);
});
describe('createMediaPlayerAction', () => {
it('should create media_player action', () => {
expect(