@@ -211,12 +211,18 @@ test('GNOME GI imports expose default namespaces and panel has a real menu', ()
|
||||
assert.match(extensionSource, /import Shell from 'gi:\/\/Shell'/);
|
||||
assert.match(extensionSource, /import Meta from 'gi:\/\/Meta'/);
|
||||
assert.match(extensionSource, /new PanelMenu.Button\(0.0, 'Jarvis QVAC', false\)/);
|
||||
assert.match(extensionSource, /PushToTalk/);
|
||||
assert.doesNotMatch(extensionSource, /DO_NOT_AUTO_START/);
|
||||
assert.match(extensionSource, /DBusProxyFlags\.NONE/);
|
||||
assert.match(extensionSource, /_keepSyncing/);
|
||||
assert.match(extensionSource, /Jarvis is starting/);
|
||||
assert.match(extensionSource, /\['Thinking'/);
|
||||
assert.match(extensionSource, /\['ToolCall'/);
|
||||
assert.match(extensionSource, /_openPopup/);
|
||||
assert.match(uiSource, /Open conversation/);
|
||||
assert.match(extensionSource, /PopupMenuSection/);
|
||||
assert.match(extensionSource, /osd\.attach\(this\._panelBox\)/);
|
||||
assert.match(uiSource, /jarvis-panel-state/);
|
||||
assert.doesNotMatch(uiSource, /style_class: 'jarvis-osd'/);
|
||||
assert.match(extensionSource, /_openSettings/);
|
||||
assert.match(extensionSource, /PopupMenuItem\('Settings'\)/);
|
||||
assert.match(extensionSource, /PopupMenuItem\('Grant desktop'\)/);
|
||||
@@ -249,12 +255,14 @@ test('session panel stays closed while Jarvis speaks unless expanded', () => {
|
||||
assert.match(session.view.transcript.children[0].text, /still talking/);
|
||||
});
|
||||
|
||||
test('OSD shows listening without opening a conversation panel', () => {
|
||||
const { JarvisOsd, SessionPanel, timers } = harness();
|
||||
test('voice status lives in the panel chip, not a floating overlay', () => {
|
||||
const { JarvisOsd, SessionPanel, timers, chrome } = harness();
|
||||
const osd = new JarvisOsd();
|
||||
const session = new SessionPanel();
|
||||
osd.attach();
|
||||
const bar = { children: [], add_child(child) { this.children.push(child); } };
|
||||
osd.attach(bar);
|
||||
session.attach();
|
||||
assert.equal(bar.children[0], osd.root);
|
||||
osd.setState('LISTENING');
|
||||
assert.equal(osd.root.visible, true);
|
||||
assert.match(osd.label.text, /Listening/);
|
||||
@@ -263,11 +271,18 @@ test('OSD shows listening without opening a conversation panel', () => {
|
||||
assert.equal(osd.root.visible, false);
|
||||
osd.setState('SPEAKING');
|
||||
assert.equal(osd.root.visible, true);
|
||||
assert.ok(timers.size >= 1);
|
||||
assert.match(osd.label.text, /Speaking/);
|
||||
assert.equal(timers.size, 0);
|
||||
osd.setState('THINKING');
|
||||
assert.match(osd.label.text, /Thinking/);
|
||||
osd.setState('SLEEPING');
|
||||
assert.match(osd.label.text, /Privacy/);
|
||||
osd.showWake();
|
||||
assert.match(osd.label.text, /Wake/);
|
||||
assert.equal(timers.size, 1);
|
||||
osd.destroy();
|
||||
assert.equal(timers.size, 0);
|
||||
assert.equal(chrome.includes(osd.root), false);
|
||||
});
|
||||
|
||||
test('computer-use chrome shows a target without a transcript', () => {
|
||||
@@ -376,18 +391,9 @@ test('closing the popup ends hold-to-talk', () => {
|
||||
assert.deepEqual(talks, [false]);
|
||||
});
|
||||
|
||||
test('prefs bind every GSettings schema key', () => {
|
||||
test('both settings entry points use the shared preferences window', () => {
|
||||
const prefs = readFileSync(new URL('../apps/gnome-extension/[email protected]/prefs.js', import.meta.url), 'utf8');
|
||||
const schema = readFileSync(new URL('../apps/gnome-extension/[email protected]/schemas/org.gnome.shell.extensions.jarvis.gschema.xml', import.meta.url), 'utf8');
|
||||
const keys = [...schema.matchAll(/<key name="([^"]+)"/g)].map((match) => match[1]);
|
||||
assert.ok(keys.length >= 14);
|
||||
for (const key of keys) assert.match(prefs, new RegExp(`['"]${key}['"]`));
|
||||
assert.match(prefs, /wakePhrase/);
|
||||
assert.match(prefs, /ttsEnabled/);
|
||||
assert.match(prefs, /modelProfile/);
|
||||
assert.match(prefs, /'tray'/);
|
||||
assert.match(prefs, /'expanded'/);
|
||||
assert.match(prefs, /ComputerGrant/);
|
||||
assert.match(prefs, /Allow now/);
|
||||
assert.match(prefs, /ComputerRevoke/);
|
||||
const control = readFileSync(new URL('../apps/control-center/main.js', import.meta.url), 'utf8');
|
||||
assert.match(prefs, /fillSettingsWindow/);
|
||||
assert.match(control, /fillSettingsWindow/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user