mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-21 05:01:26 -07:00
fix(setup): label missing launcher "Not set up" instead of "Not installed" (#284)
This commit is contained in:
1 parent
9ffa2bce94
commit
4b6842d034
3 files changed
+43
-1
No files matched your search
@@ -324,6 +324,42 @@ test('buildFirstRunSetupHtml reports a broken included runtime in the optional l
|
||||
);
|
||||
});
|
||||
|
||||
// The AppImage catalog test OCRs this fresh-install state and fails on "not installed".
|
||||
test('buildFirstRunSetupHtml labels a missing launcher without error-message wording', () => {
|
||||
const html = buildFirstRunSetupHtml({
|
||||
configReady: true,
|
||||
dictionaryCount: 0,
|
||||
canFinish: false,
|
||||
externalYomitanConfigured: false,
|
||||
pluginStatus: 'required',
|
||||
pluginInstallPathSummary: null,
|
||||
mpvExecutablePath: '',
|
||||
mpvExecutablePathStatus: 'blank',
|
||||
windowsMpvShortcuts: {
|
||||
supported: false,
|
||||
startMenuEnabled: true,
|
||||
desktopEnabled: true,
|
||||
startMenuInstalled: false,
|
||||
desktopInstalled: false,
|
||||
status: 'optional',
|
||||
},
|
||||
commandLineLauncher: createCommandLineLauncherSnapshot({
|
||||
bun: {
|
||||
status: 'ready',
|
||||
commandPath: '/tmp/.mount_SubMiner/resources/bun',
|
||||
version: '1.3.0',
|
||||
installMethod: null,
|
||||
installCommand: null,
|
||||
message: null,
|
||||
},
|
||||
}),
|
||||
message: null,
|
||||
});
|
||||
|
||||
assert.match(html, /<span class="badge warn">Not set up<\/span>/);
|
||||
assert.doesNotMatch(html, /not installed/i);
|
||||
});
|
||||
|
||||
test('buildFirstRunSetupHtml disables launcher install when no target is installable', () => {
|
||||
const html = buildFirstRunSetupHtml({
|
||||
configReady: true,
|
||||
|
||||
@@ -77,7 +77,9 @@ function getLauncherStatusLabel(status: LauncherSnapshot['status']): string {
|
||||
case 'installed_bun_missing':
|
||||
return 'Unavailable';
|
||||
case 'not_installed':
|
||||
return 'Not installed';
|
||||
// Not "Not installed": the AppImage catalog test OCRs the fresh-install
|
||||
// setup window and fails on that phrase as an error message.
|
||||
return 'Not set up';
|
||||
case 'not_on_path':
|
||||
return 'Not on PATH';
|
||||
case 'shadowed':
|
||||
|
||||
Reference in new issue
Block a user