Skip to content

Commit d2cab83

Browse files
test(web): pin that a stale-grant Cmd+O is consumed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent f0742ce commit d2cab83

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/web/src/components/chat/OpenInPicker.browser.test.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async function setup() {
9191
stack.use(_platform);
9292
const _storage = { [Symbol.dispose]: () => window.localStorage.clear() };
9393
stack.use(_storage);
94-
// The chat root registers this command in the app.
94+
// The app registers this command at startup (appInit).
9595
const _openFavorite = { [Symbol.dispose]: registerOpenFavoriteEditorCommand() };
9696
stack.use(_openFavorite);
9797
const screen = stack.use(await renderUi(null));
@@ -177,7 +177,8 @@ describe("host editor access", () => {
177177
state.allowed.delete(selected);
178178
state.allowed.add(primary);
179179
await click(primaryButton());
180-
await pressOpenFavorite();
180+
// The shortcut is consumed and opens nothing once the grant is gone.
181+
expect((await pressOpenFavorite()).defaultPrevented).toBe(true);
181182
expect(state.run).not.toHaveBeenCalled();
182183
expect(state.setPreferred).not.toHaveBeenCalled();
183184

0 commit comments

Comments
 (0)