feat: Implement basic general folder support (#2051)

- Related: #1748
This commit is contained in:
Dermot Duffy
2025-05-21 19:59:21 -07:00
committed by GitHub
parent 2eb0d9e35e
commit c6a4c8aea2
350 changed files with 12837 additions and 4509 deletions
+14 -2
View File
@@ -5,6 +5,7 @@ import { ActionConfig } from '../../src/config/schema/actions/types.js';
import {
createCameraAction,
createDisplayModeAction,
createFolderAction,
createGeneralAction,
createInternalCallbackAction,
createLogAction,
@@ -50,7 +51,7 @@ describe('createViewAction', () => {
});
describe('createCameraAction', () => {
it('should create camera_select', () => {
it('should create camera_select action', () => {
expect(createCameraAction('camera_select', 'camera', { cardID: 'card_id' })).toEqual(
{
action: 'fire-dom-event',
@@ -62,8 +63,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',
});
});
});
describe('createMediaPlayerAction', () => {
it('should create media_player', () => {
it('should create media_player action', () => {
expect(
createMediaPlayerAction('device', 'play', {
cardID: 'card_id',