add warning and danger transitions as timer life cycle events (#1071)

* setup detection of TImerPhase changes

* add integration event for transition to warning

* add integration event for transition to danger

---------

Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
2024-06-15 02:54:29 -05:00
committed by GitHub
parent 1044dfac01
commit 70e8fbf327
5 changed files with 39 additions and 1 deletions
@@ -645,6 +645,8 @@ describe('test import of v2 datamodel', () => {
onStop: [],
onUpdate: [],
onFinish: [],
onWarning: [],
onDanger: [],
},
},
http: {
@@ -33,6 +33,8 @@ describe('sanitiseOscSubscriptions()', () => {
{ id: '4', cycle: 'onStop', address: '/test', payload: 'test', enabled: false },
{ id: '5', cycle: 'onUpdate', address: '/test', payload: 'test', enabled: true },
{ id: '6', cycle: 'onFinish', address: '/test', payload: 'test', enabled: false },
{ id: '7', cycle: 'onWarning', address: '/test', payload: 'test', enabled: false },
{ id: '8', cycle: 'onDanger', address: '/test', payload: 'test', enabled: false },
];
const sanitationResult = sanitiseOscSubscriptions(oscSubscriptions);
expect(sanitationResult).toStrictEqual(oscSubscriptions);
@@ -69,6 +71,8 @@ describe('sanitiseHttpSubscriptions()', () => {
{ id: '4', cycle: 'onStop', message: 'http://test', enabled: false },
{ id: '5', cycle: 'onUpdate', message: 'http://test', enabled: true },
{ id: '6', cycle: 'onFinish', message: 'http://test', enabled: false },
{ id: '7', cycle: 'onWarning', message: 'http://test', enabled: false },
{ id: '8', cycle: 'onDanger', message: 'http://test', enabled: false },
];
const sanitationResult = sanitiseHttpSubscriptions(httpSubscription);
expect(sanitationResult).toStrictEqual(httpSubscription);