forked from Blendman974/faceclaw
Weather app on glanceboard system card and status bar, and has an image
This commit is contained in:
1 parent
61ede9b2a0
commit
6db913af48
15 files changed
+762
-33
No files matched your search
@@ -93,8 +93,9 @@ test('Navigate host releases GPS and compass together and ignores an old stream
|
||||
test('Weather uses the portable location provider and preserves NWS parsing', async () => {
|
||||
const requests = [], timers = new Set(); let permission = true;
|
||||
const period = { name: 'Today', temperature: 70, temperatureUnit: 'F', shortForecast: 'Sunny', windSpeed: '5 mph', windDirection: 'W' };
|
||||
const api = loader({ setTimeout, clearTimeout, setInterval: fn => { timers.add(fn); return fn; }, clearInterval: fn => timers.delete(fn) }, {
|
||||
const api = loader({ setTimeout: fn => { timers.add(fn); return fn; }, clearTimeout: fn => timers.delete(fn) }, {
|
||||
'./location-permissions': { hasLocationPermission: () => permission },
|
||||
'./settings-store': { getStringSetting: (_key, fallback) => fallback, setStringSetting() {} },
|
||||
'./location': { getCurrentLocation: async () => fix },
|
||||
'../version': { USER_AGENT: 'test' },
|
||||
'../util/http': { fetchWithUserAgent: async url => { requests.push(url); return { ok: true, json: async () =>
|
||||
@@ -115,6 +116,9 @@ test('closing Weather during permission prompt cannot restart polling', async ()
|
||||
'../../native/location-permissions': { hasLocationPermission: () => false, ensureLocationPermission: () => new Promise(resolve => { granted = resolve; }) },
|
||||
'../../native/weather': { weatherBridge: { start() { starts++; }, stop() { stops++; }, onStateChange: () => () => {}, snapshot() {} } },
|
||||
'./weather': { WeatherLayer: class {} },
|
||||
'./weather-settings': {},
|
||||
'../../ui/dashboard-settings': { toggleSettingMenuItem: () => ({}) },
|
||||
'../../ui/dashboard/settings-panel': { openSettingsSubMenu() {} },
|
||||
'../../ui/shell/in-process-window': { YieldAtRootLayer: class {}, createInProcessWindow: opts => { options = opts; return { requestRender() {} }; } },
|
||||
})('app/apps/weather/weather-app.ts');
|
||||
api.createWeatherAppWindow({ onClosed() {} }); options.onClosed(); granted(true); await flush();
|
||||
|
||||
Reference in new issue
Block a user