forked from Blendman974/faceclaw
Add an Apple Music integration on iOS
This commit is contained in:
1 parent
1780057f3c
commit
e36fb14a34
21 files changed
+1323
-129
No files matched your search
@@ -228,10 +228,12 @@ test('iOS assistant calendar tool awaits events, reports denied access and failu
|
||||
const f = provider(), registered = new Map();
|
||||
const { registerSystemTools } = load('app/assistant/system-tools.ts', {
|
||||
'../native/calendar': f.api, '../native/calendar-permissions': f.permissions,
|
||||
'../native/media-controller': {}, '../native/notification-icons': {}, '../ui/shell/shell': {}, './tool-registry': {},
|
||||
'../native/media-controller': { mediaControllerBridge: { start: async () => {} } },
|
||||
'../native/notification-icons': {}, '../ui/shell/shell': {}, './tool-registry': {},
|
||||
}, { global: { isIOS: true } });
|
||||
registerSystemTools({ registerSystemTool: (definition, handler) => registered.set(definition.name, handler) });
|
||||
assert.deepEqual([...registered.keys()], ['glasses.get_state', 'glasses.show_alert', 'calendar.list_events']);
|
||||
assert.deepEqual([...registered.keys()], ['glasses.get_state', 'glasses.show_alert', 'calendar.list_events',
|
||||
'media.now_playing', 'media.play_pause', 'media.next']);
|
||||
const list = registered.get('calendar.list_events');
|
||||
const result = list({ within_hours: 2, max_events: 3 });
|
||||
assert.equal(f.reads[0].max, 3); assert.equal(f.reads[0].window, 7200000);
|
||||
|
||||
Reference in new issue
Block a user