Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions docs/MANUAL-TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2724,42 +2724,46 @@ the Windows installer is the kit's asking installer and `installer.nsh` is gone.
It also passes its `appId` to the kit, says when it's busy, and takes the kit's
Update tab changes since 0.1.0-beta.3.

> **Status: not yet run.**
> **Status: signed off by Will 2026-10-07** on a code review against
> electron-kit's CI install check, after he'd run the installer itself. The
> upgrade's administrator prompt and the taskbar pin weren't run by hand. Two
> findings: the right-click box's text was clipped (electron-kit #50, in
> beta.7), and Restart Now could keep asking after a run that threw (#9).

### Upgrading an install for everyone (every earlier version's)

- [ ] With beta.5 installed (for everyone), run the beta.6 installer. It does
- [x] With beta.5 installed (for everyone), run the beta.6 installer. It does
not ask who it's for: it upgrades that copy, and Settings > Apps lists
Diamond File Converter once.
- [ ] Right-click a file, then a folder: **Convert with Diamond File
- [x] Right-click a file, then a folder: **Convert with Diamond File
Converter** is there once on each (Windows 11: under "Show more
options"), with the app's icon, and opens the file or folder in the app.
- [ ] Right-click an `.mp3`, Open with: Diamond File Converter is offered.
- [x] Right-click an `.mp3`, Open with: Diamond File Converter is offered.

### A fresh install, only for me

- [ ] Uninstall, then run the installer again: it asks who it's for, "Only for
- [x] Uninstall, then run the installer again: it asks who it's for, "Only for
me" chosen, and installs with no administrator prompt.
- [ ] The file types page shows the 22 types in three groups, all ticked, and
- [x] The file types page shows the 22 types in three groups, all ticked, and
the right-click box ticked. Untick **WMA** and the right-click box.
- [ ] After the install, a `.wma` doesn't offer the app in Open with, an
- [x] After the install, a `.wma` doesn't offer the app in Open with, an
`.mp3` does, and there's no Convert entry on right-click.
- [ ] Install the same build again over it: WMA and the right-click box start
- [x] Install the same build again over it: WMA and the right-click box start
unticked.
- [ ] Uninstall: the app is gone from Open with for every type.
- [x] Uninstall: the app is gone from Open with for every type.

### The Update tab and Restart Now

- [ ] Open the app and go straight to Settings > Update: the status line is
- [x] Open the app and go straight to Settings > Update: the status line is
never empty. It says "Updates haven't been checked yet." for a moment
at most, then "Checking for updates…", then the result.
- [ ] Open Settings > Update only after ten seconds: one check has run, and
- [x] Open Settings > Update only after ten seconds: one check has run, and
Check for Updates runs another.
- [ ] With an update downloaded, start a long conversion and press **Restart
- [x] With an update downloaded, start a long conversion and press **Restart
Now**: it asks first ("A conversion is running."), and Cancel keeps the
conversion going. The same while a join runs ("A join is running.").

### Notifications and the taskbar (Windows)

- [ ] Pin the app to the taskbar and open it: its window groups under the
- [x] Pin the app to the taskbar and open it: its window groups under the
pinned icon, not a second one.
36 changes: 23 additions & 13 deletions src/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,16 +1518,21 @@ async function startConversion() {

// Every job is submitted at once; the runner's pool decides how many
// actually run in parallel. v1 awaited them one at a time.
const results = await Promise.all(runnable.map(async (job) => {
const result = await api.runJob(
{ id: job.id, inputPath: job.filePath, targetExt: job.targetExt, ...(job.settings ?? {}),
output: withMirrorRoot(job) });
applyResult(job, result);
return result;
}));

converting = false;
render();
// However it ends: a batch that threw would otherwise leave Restart Now
// asking about a conversion that isn't running.
let results;
try {
results = await Promise.all(runnable.map(async (job) => {
const result = await api.runJob(
{ id: job.id, inputPath: job.filePath, targetExt: job.targetExt, ...(job.settings ?? {}),
output: withMirrorRoot(job) });
applyResult(job, result);
return result;
}));
} finally {
converting = false;
render();
}
announce(results);
}

Expand Down Expand Up @@ -1889,9 +1894,14 @@ async function runJoin() {
joinProgress.set(0);
renderJoinActions();

const result = await api.runJoin(spec);
joinRunning = null;
renderJoinActions();
// However it ends, as a conversion's.
let result;
try {
result = await api.runJoin(spec);
} finally {
joinRunning = null;
renderJoinActions();
}

if (result.status === "done") {
kit.ui.toast(`Joined ${kit.format.countOf(joinClips.length, "file")} into ${p.basename(result.outputPath)}.`, { type: "success" });
Expand Down
7 changes: 7 additions & 0 deletions test/kit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ test("the Title Case slips DESIGN.md lists are fixed: buttons and titles are Tit
}
});

test("what Restart Now asks about is cleared however a conversion or a join ends, a throw included", () => {
const renderer = read("renderer.js");
assert.match(renderer, /busy: \(\) => \(converting \? "A conversion is running\." : joinRunning \? "A join is running\." : null\)/);
assert.match(renderer, /\} finally \{\r?\n\s+converting = false;/);
assert.match(renderer, /\} finally \{\r?\n\s+joinRunning = null;/);
});

test("progress of null is \"not known\": a card's and Join's bars slide, never sit at 0% or read null%", () => {
const renderer = read("renderer.js");
assert.match(renderer, /progress\.set\(typeof job\.progress === "number" \? job\.progress : null\)/);
Expand Down
Loading