mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(desktop): fix manual update wording and retry Velopack (#3261)
This commit is contained in:
1 parent
5c63d81ffd
commit
2e3e3a1536
3 files changed
+52
-4
No files matched your search
@@ -547,6 +547,38 @@ describe('Updater Windows apply failures', () => {
|
||||
assert.equal(updater.applyState.attempt.version, PUBLISHED_VERSION);
|
||||
});
|
||||
|
||||
test('keeps offering the installer when no newer release than the failed one is out', async () => {
|
||||
const updater = loadWindowsUpdater({
|
||||
installedVersion: CURRENT_VERSION,
|
||||
remoteUpdate: {Version: PUBLISHED_VERSION, Size: 100},
|
||||
applyAttempt: {version: PUBLISHED_VERSION, attemptedAt: 0},
|
||||
});
|
||||
|
||||
await updater.check();
|
||||
|
||||
assert.deepEqual(types(updater.events), ['checking', 'error', 'available']);
|
||||
assert.equal(updater.events[2].downloadStarted, false);
|
||||
assert.equal(updater.applyState.cleared, 0);
|
||||
});
|
||||
|
||||
test('retries the in-app update when a newer release than the failed one is out', async () => {
|
||||
const newerVersion = '2026.905.101010';
|
||||
const updater = loadWindowsUpdater({
|
||||
installedVersion: CURRENT_VERSION,
|
||||
pendingRestart: {Version: PUBLISHED_VERSION, Size: 100},
|
||||
remoteUpdate: {Version: newerVersion, Size: 200},
|
||||
applyAttempt: {version: PUBLISHED_VERSION, attemptedAt: 0},
|
||||
});
|
||||
|
||||
await updater.check();
|
||||
|
||||
assert.equal(updater.applyState.cleared, 1);
|
||||
assert.equal(updater.applyState.attempt, null);
|
||||
assert.deepEqual(types(updater.events), ['checking', 'available']);
|
||||
assert.equal(updater.events[1].version, newerVersion);
|
||||
assert.equal(updater.events[1].downloadUrl, undefined);
|
||||
});
|
||||
|
||||
test('resumes normal updates once the installed version catches up', async () => {
|
||||
const updater = loadWindowsUpdater({
|
||||
installedVersion: PUBLISHED_VERSION,
|
||||
|
||||
Reference in new issue
Block a user