feat: Add folder view to view folder media (#2077)

- Closes: #2068

Note: Renames existing `folder` view to `folders` [experimental
functionality]
This commit is contained in:
Dermot Duffy
2025-05-31 17:13:39 -07:00
committed by GitHub
parent 1901475065
commit 956a2e523c
30 changed files with 246 additions and 132 deletions
+14 -9
View File
@@ -5,7 +5,7 @@ import { ActionConfig } from '../../src/config/schema/actions/types.js';
import {
createCameraAction,
createDisplayModeAction,
createFolderAction,
createFoldersViewAction,
createGeneralAction,
createInternalCallbackAction,
createLogAction,
@@ -64,14 +64,19 @@ describe('createCameraAction', () => {
});
describe('createFolderAction', () => {
it('should create folder action', () => {
expect(createFolderAction({ folderID: 'folderID', cardID: 'card_id' })).toEqual({
action: 'fire-dom-event',
advanced_camera_card_action: 'folder',
card_id: 'card_id',
folder: 'folderID',
});
});
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', () => {