mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-06 19:58:43 +02:00
fix: add up-to-date state so Check for updates gives visible feedback
When electron-updater reports no update available, the service now transitions to 'up-to-date' instead of reverting silently to 'idle'. The troubleshooting UI shows a green check icon, 'Up to date' label, and 'You are running the latest version of Aryx.' description. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -148,6 +148,22 @@ describe('AutoUpdateService', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
test('transitions to up-to-date when no update is available', () => {
|
||||
const updater = new FakeUpdater();
|
||||
const service = new AutoUpdateService({ isPackaged: true, updater });
|
||||
const statuses: UpdateStatus[] = [];
|
||||
service.onStatus((status) => statuses.push(status));
|
||||
|
||||
updater.emit('checking-for-update');
|
||||
updater.emit('update-not-available', {});
|
||||
|
||||
expect(statuses).toEqual([
|
||||
{ state: 'checking' },
|
||||
{ state: 'up-to-date' },
|
||||
]);
|
||||
expect(service.getStatus()).toEqual({ state: 'up-to-date' });
|
||||
});
|
||||
|
||||
test('reports updater errors and only installs once an update is downloaded', () => {
|
||||
const updater = new FakeUpdater();
|
||||
const service = new AutoUpdateService({ isPackaged: true, updater });
|
||||
|
||||
Reference in New Issue
Block a user