feat: Implement support for gesture-based PTZ control (#2378)
- Closes: #1839
This commit is contained in:
@@ -110,9 +110,10 @@ describe('createDisplayModeAction', () => {
|
||||
});
|
||||
|
||||
describe('createPTZControlsAction', () => {
|
||||
it('should create PTZ controls action', () => {
|
||||
it('should create PTZ controls action with enabled', () => {
|
||||
expect(
|
||||
createPTZControlsAction(true, {
|
||||
createPTZControlsAction({
|
||||
enabled: true,
|
||||
cardID: 'card_id',
|
||||
}),
|
||||
).toEqual({
|
||||
@@ -122,6 +123,18 @@ describe('createPTZControlsAction', () => {
|
||||
card_id: 'card_id',
|
||||
});
|
||||
});
|
||||
|
||||
it('should create PTZ controls action with type', () => {
|
||||
expect(
|
||||
createPTZControlsAction({
|
||||
type: 'gestures',
|
||||
}),
|
||||
).toEqual({
|
||||
action: 'fire-dom-event',
|
||||
advanced_camera_card_action: 'ptz_controls',
|
||||
type: 'gestures',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('createPTZAction', () => {
|
||||
|
||||
Reference in New Issue
Block a user