mirror of
https://github.com/block/buzz.git
synced 2026-12-01 13:42:45 +00:00
Fix desktop header and popover smoke checks
Restore channel descriptions in the header and make the profile popover smoke test target the profile popover explicitly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -99,6 +99,14 @@ export function ChatHeader({
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{trimmedDescription ? (
|
||||
<p
|
||||
className="truncate text-sm text-muted-foreground"
|
||||
data-testid="chat-description"
|
||||
>
|
||||
{trimmedDescription}
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{actions ? <div className="shrink-0">{actions}</div> : null}
|
||||
|
||||
@@ -121,6 +121,7 @@ export function UserProfilePopover({
|
||||
clearHoverTimer();
|
||||
if (openProfilePanel) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
setOpen(false);
|
||||
openProfilePanel(pubkey);
|
||||
}
|
||||
@@ -143,6 +144,7 @@ export function UserProfilePopover({
|
||||
onKeyDown={(e) => {
|
||||
if ((e.key === "Enter" || e.key === " ") && openProfilePanel) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
clearHoverTimer();
|
||||
setOpen(false);
|
||||
openProfilePanel(pubkey);
|
||||
@@ -158,6 +160,7 @@ export function UserProfilePopover({
|
||||
<PopoverContent
|
||||
align="start"
|
||||
className="w-80"
|
||||
data-testid="user-profile-popover"
|
||||
onMouseEnter={handleContentMouseEnter}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
side="top"
|
||||
|
||||
@@ -157,14 +157,11 @@ test("hovering avatar opens popover, clicking opens profile panel", async ({
|
||||
|
||||
// Hover should open the popover
|
||||
await avatarButton.hover();
|
||||
await expect(
|
||||
page.locator("[data-radix-popper-content-wrapper]"),
|
||||
).toBeVisible();
|
||||
const profilePopover = page.getByTestId("user-profile-popover");
|
||||
await expect(profilePopover).toBeVisible();
|
||||
|
||||
// Click should close the popover and open the profile panel
|
||||
await avatarButton.click();
|
||||
await expect(
|
||||
page.locator("[data-radix-popper-content-wrapper]"),
|
||||
).not.toBeVisible();
|
||||
await expect(profilePopover).not.toBeVisible();
|
||||
await expect(page.getByTestId("user-profile-panel")).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user