fix(desktop): avoid forwarding click event as channel callback (#2174)

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
Wes
2026-07-20 14:44:08 -07:00
committed by GitHub
co-authored by Pinky
parent 37f15b2001
commit 9ed843a0ac
2 changed files with 11 additions and 2 deletions
@@ -729,7 +729,7 @@ export function AppSidebar({
actionsTestId="section-actions-channels"
listTestId="stream-list"
quickCreateLabel="Browse channels"
onQuickCreateClick={onBrowseChannels}
onQuickCreateClick={() => onBrowseChannels?.()}
showQuickCreate
onMarkAllRead={onMarkAllChannelsRead}
onMarkChannelRead={onMarkChannelRead}
+10 -1
View File
@@ -213,13 +213,22 @@ test("channel browser ranks the best match first", async ({ page }) => {
);
});
test("sidebar add-channel button opens the browser", async ({ page }) => {
test("sidebar add-channel button creates without treating the click as a callback", async ({
page,
}) => {
await page.goto("/");
await expect(page.getByTestId("app-sidebar")).toBeVisible();
await page.getByTestId("section-actions-channels-quick-create").click();
await expect(page.getByTestId("channel-browser-dialog")).toBeVisible();
const channelName = `sidebar-created-${Date.now()}`;
await page.getByTestId("channel-browser-search").fill(channelName);
await page.getByTestId("channel-browser-create-row").click();
await page.getByTestId("create-channel-submit").click();
await expect(page.getByTestId("channel-browser-dialog")).not.toBeVisible();
await expect(page.getByTestId("stream-list")).toContainText(channelName);
});
test("custom section add button creates directly into that section", async ({