fix: Reolink PTZ support should detect presets (#1997)
- Related: #1964
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
createPTZControlsAction,
|
||||
createPTZDigitalAction,
|
||||
createPTZMultiAction,
|
||||
createSelectOptionAction,
|
||||
createViewAction,
|
||||
getActionConfigGivenAction,
|
||||
hasAction,
|
||||
@@ -267,6 +268,24 @@ describe('createPerformAction', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('createSelectOptionAction', () => {
|
||||
it('should create select option action', () => {
|
||||
expect(
|
||||
createSelectOptionAction('select', 'select.foo', 'option', {
|
||||
cardID: 'card_id',
|
||||
}),
|
||||
).toEqual({
|
||||
action: 'perform-action',
|
||||
perform_action: 'select.select_option',
|
||||
card_id: 'card_id',
|
||||
target: { entity_id: 'select.foo' },
|
||||
data: {
|
||||
option: 'option',
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('getActionConfigGivenAction', () => {
|
||||
const action = createViewAction('clips');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user