Fixes
Rolling release / release (push) Successful in 6m33s

This commit is contained in:
2026-09-12 11:26:19 -04:00
parent 5b7c2b3b6d
commit 0312fedaa7
9 changed files with 184 additions and 37 deletions
+7
View File
@@ -506,3 +506,10 @@ test('both settings entry points use the shared preferences window', () => {
assert.match(prefs, /fillSettingsWindow/);
assert.match(control, /fillSettingsWindow/);
});
test('the Shell helper can capture a screenshot from inside GNOME', () => {
const source = readFileSync(new URL('../apps/gnome-extension/[email protected]/shell-dbus.js', import.meta.url), 'utf8');
assert.match(source, /method name="Screenshot"/);
assert.match(source, /new Shell\.Screenshot/);
assert.match(source, /screenshot\(false, stream\)/);
});
+16
View File
@@ -15,6 +15,22 @@ test('Phase 6 observer returns stable refs and ranked semantic matches', async (
const zoom = await observer.zoom({ ref: 'r1' }); assert.deepEqual(zoom.rect, [10, 20, 30, 30]);
});
test('observer returns when the Shell helper never connects', async () => {
const observer = new DesktopObserver({
screenshot: { capture: async () => '/tmp/frame.png' },
normalizer: { normalize: async () => ({ path: '/tmp/frame.webp' }) },
shell: { connect: () => new Promise(() => {}), windows: async () => assert.fail('shell windows'), focused: async () => assert.fail('shell focused') },
atspi: { tree: async () => [{ role: 'label', name: 'Discord', rect: [0, 0, 10, 10] }] },
timeouts: { shell: 40 },
});
const started = Date.now();
const bundle = await observer.observe({ includeOcr: false });
assert.ok(Date.now() - started < 1000);
assert.equal(bundle.screenshot_path, '/tmp/frame.webp');
assert.equal(bundle.tree[0].name, 'Discord');
assert.match(bundle.unavailable.join(' '), /Shell helper/);
});
test('observer returns after a hung screenshot instead of staying on THINKING', async () => {
const observer = new DesktopObserver({
screenshot: { capture: () => new Promise(() => {}) },