mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
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:
@@ -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}
|
||||
|
||||
@@ -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 ({
|
||||
|
||||
Reference in New Issue
Block a user