Skip to content

Commit 360da26

Browse files
committed
test(web): align registered Browser panel host fixture with main
1 parent 2e48b67 commit 360da26

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

‎apps/web/src/components/RightPanelTabs.tsx‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,16 +294,21 @@ export function rightPanelSurfaceActions(props: SurfaceActionInputs): SurfaceAct
294294
unavailableReason: "Devices are only available from a thread.",
295295
onClick: props.onAddDevice,
296296
},
297-
...(props.onAddSideChat ? [{
298-
id: "side-chat",
299-
label: "Side chat",
300-
icon: MessagesSquare,
301-
shortcut: "S",
302-
available: props.sideChatAvailable === true && !props.sideChatDisabledReason,
303-
unavailableHint: props.sideChatDisabledReason ?? "Available after the first message.",
304-
unavailableReason: props.sideChatDisabledReason ?? "Side chats start after the first message.",
305-
onClick: () => props.onAddSideChat?.(),
306-
}] : []),
297+
...(props.onAddSideChat
298+
? [
299+
{
300+
id: "side-chat",
301+
label: "Side chat",
302+
icon: MessagesSquare,
303+
shortcut: "S",
304+
available: props.sideChatAvailable === true && !props.sideChatDisabledReason,
305+
unavailableHint: props.sideChatDisabledReason ?? "Available after the first message.",
306+
unavailableReason:
307+
props.sideChatDisabledReason ?? "Side chats start after the first message.",
308+
onClick: () => props.onAddSideChat?.(),
309+
},
310+
]
311+
: []),
307312
];
308313
}
309314

‎apps/web/src/panels/preview/PreviewSidePanel.browser.test.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ vi.mock("~/previewMiniPlayerStore", () => ({
147147
),
148148
}));
149149
vi.mock("~/rightPanelStore", () => ({
150+
rightPanelHostRef: (ref: ScopedThreadRef) => ref,
150151
selectSelectedRightPanelSurface: () => null,
151152
useRightPanelStore: { getState: () => ({ close: vi.fn() }) },
152153
}));

0 commit comments

Comments
 (0)