fix(app): align Settings controls and version metadata
The editor select referenced an undefined style class, and the renderer hard-coded 0.1.0 instead of reading Electron app metadata.
This commit is contained in:
@@ -388,6 +388,12 @@ test('session IPC hides Codex rows by default and supports explicit source opt-i
|
||||
const restore = registerMocks([
|
||||
[ELECTRON_URL, {
|
||||
namedExports: electronNamespace({
|
||||
app: {
|
||||
whenReady: () => Promise.resolve(),
|
||||
on() {},
|
||||
quit() {},
|
||||
getVersion: () => '9.8.7-test',
|
||||
},
|
||||
BrowserWindow: FakeBrowserWindow,
|
||||
ipcMain: {
|
||||
handle(channel, handler) {
|
||||
@@ -419,7 +425,8 @@ test('session IPC hides Codex rows by default and supports explicit source opt-i
|
||||
assert.match(queries.at(-1).sql, /COALESCE\(source, 'claude'\) = \?/);
|
||||
assert.ok(queries.at(-1).params.includes('codex'));
|
||||
|
||||
await ipcHandlers.get('settings:get')();
|
||||
const settings = await ipcHandlers.get('settings:get')();
|
||||
assert.equal(settings.version, '9.8.7-test');
|
||||
assert.ok(
|
||||
queries.some(q => /GROUP BY COALESCE\(source, 'claude'\)/.test(q.sql)),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
const source = readFileSync(
|
||||
new URL('../app/src/renderer/src/views/Settings.vue', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
test('Settings reads the displayed version from the settings payload', () => {
|
||||
assert.doesNotMatch(source, /const version = ref\(['"]0\.1\.0['"]\)/);
|
||||
assert.match(source, /version\.value = s\.version/);
|
||||
});
|
||||
|
||||
test('Editor selector uses the themed Settings control vocabulary', () => {
|
||||
assert.match(source, /<select class="path-field select-field"/);
|
||||
assert.match(source, /\.select-field\s*\{[^}]*appearance:\s*none/s);
|
||||
assert.match(source, /\.select-control::after\s*\{/);
|
||||
});
|
||||
Reference in New Issue
Block a user