From 3bcafbbb64cc2fee81f97a26bb2ef7d7d5542cad Mon Sep 17 00:00:00 2001 From: Saafo <46736350+Saafo@users.noreply.github.com> Date: Wed, 28 Oct 2026 12:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Align=20drawer=20snapshots=20and=20?= =?UTF-8?q?shortcut=20expectations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/ui-shortcuts/tests/commands.client.spec.ts | 8 ++++++-- .../__snapshots__/sidebar-snapshot.client.spec.tsx.snap | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/client/ui-shortcuts/tests/commands.client.spec.ts b/packages/client/ui-shortcuts/tests/commands.client.spec.ts index 5b1401a75a..63f4f2be1d 100644 --- a/packages/client/ui-shortcuts/tests/commands.client.spec.ts +++ b/packages/client/ui-shortcuts/tests/commands.client.spec.ts @@ -130,12 +130,14 @@ describe('assembled shortcut command owners', () => { expect(settings.getSnapshot().open).toBe(false) const sidebar = layout.getSnapshot().layoutInfo.sidebar press('KeyB') - expect(layout.getSnapshot().layoutInfo.sidebar).not.toBe(sidebar) + expect(layout.getSnapshot().layoutInfo.sidebar).toBe(sidebar) press('Slash') expect(reference.getSnapshot().open).toBe(false) press('KeyB') - expect(layout.getSnapshot().layoutInfo.sidebar).toBe(sidebar) + expect(layout.getSnapshot().layoutInfo.sidebar).not.toBe(sidebar) press('KeyB', true) + expect(layout.getSnapshot().layoutInfo.sidebar).not.toBe(sidebar) + press('KeyB') expect(layout.getSnapshot().layoutInfo.sidebar).toBe(sidebar) const menu = (commandId: ShortcutCommandId): void => { act(() => { @@ -144,6 +146,8 @@ describe('assembled shortcut command owners', () => { } menu('settings.open' as ShortcutCommandId) expect(settings.getSnapshot().open).toBe(true) + press('KeyB') + expect(layout.getSnapshot().layoutInfo.sidebar).toBe(sidebar) menu('settings.open' as ShortcutCommandId) expect(settings.getSnapshot().open).toBe(false) menu('shortcuts.open' as ShortcutCommandId) diff --git a/packages/client/ui-sidebar/tests/__snapshots__/sidebar-snapshot.client.spec.tsx.snap b/packages/client/ui-sidebar/tests/__snapshots__/sidebar-snapshot.client.spec.tsx.snap index 433bcba048..7f6e1ba454 100644 --- a/packages/client/ui-sidebar/tests/__snapshots__/sidebar-snapshot.client.spec.tsx.snap +++ b/packages/client/ui-sidebar/tests/__snapshots__/sidebar-snapshot.client.spec.tsx.snap @@ -16,6 +16,7 @@ exports[`sidebar shell snapshots > renders Windows caption controls in expanded