+14
-17
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user