From be939f401bdb1372b0f6c9faef754d7a10ff4118 Mon Sep 17 00:00:00 2001 From: Guillaume ETHEVE Date: Fri, 6 Nov 2026 01:22:28 +0100 Subject: [PATCH] test: update system menu expectations and explicit in-app hold focus --- tests/ai-chat.test.cjs | 1 + tests/brightness-picker.test.cjs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ai-chat.test.cjs b/tests/ai-chat.test.cjs index 635ce280..87864c54 100644 --- a/tests/ai-chat.test.cjs +++ b/tests/ai-chat.test.cjs @@ -370,6 +370,7 @@ test('ordinary apps retain long-press system menu and games retain the escape ti assert.deepEqual(env.input, []); env.shell.stack.clearToBase(); env.app.window.claimsLongPress = () => true; + env.shell.focusWindow('ai-chat'); await env.shell.receiveInput(env.event('long-press')); assert.notEqual(env.shell.escapeMenuTimer, null); await env.shell.receiveInput(env.event('long-press-release')); diff --git a/tests/brightness-picker.test.cjs b/tests/brightness-picker.test.cjs index bc212b57..cb123306 100644 --- a/tests/brightness-picker.test.cjs +++ b/tests/brightness-picker.test.cjs @@ -120,13 +120,14 @@ test('system menu hides brightness in Auto and opens its picker between Voice in shell.openSystemMenu('test'); let opened = shell.stack.layers.at(-1); assert.deepEqual(Array.from(opened.items, (item) => item.label), - ['Close window', 'Focus app switcher', 'Voice input', 'Debug']); + ['Close current app', 'Focus app switcher', 'Voice input', 'Close all apps', 'Debug']); shell.stack.clearToBase(); f.settings.brightnessSetting.set('40'); shell.openSystemMenu('test'); opened = shell.stack.layers.at(-1); assert.deepEqual(Array.from(opened.items, (item) => item.label), - ['Close window', 'Focus app switcher', 'Voice input', 'Brightness', 'Debug']); + ['Close current app', 'Focus app switcher', 'Voice input', 'Close all apps', 'Brightness', 'Debug']); + await shell.stack.handleInput(gestures.makeInputEvent({ type: 'scroll-down' })); await shell.stack.handleInput(gestures.makeInputEvent({ type: 'scroll-down' })); await shell.stack.handleInput(gestures.makeInputEvent({ type: 'scroll-down' })); await shell.stack.handleInput(gestures.makeInputEvent({ type: 'click', source: 'ring' }));