diff --git a/desktop/src/features/home/ui/InboxDetailPane.tsx b/desktop/src/features/home/ui/InboxDetailPane.tsx index c1506b1ab..6f76496ef 100644 --- a/desktop/src/features/home/ui/InboxDetailPane.tsx +++ b/desktop/src/features/home/ui/InboxDetailPane.tsx @@ -314,7 +314,8 @@ export function InboxDetailPane({
{displayMessages.map((message, index) => ( diff --git a/desktop/src/features/home/ui/InboxListPane.tsx b/desktop/src/features/home/ui/InboxListPane.tsx index 7734b5266..ce0333473 100644 --- a/desktop/src/features/home/ui/InboxListPane.tsx +++ b/desktop/src/features/home/ui/InboxListPane.tsx @@ -435,7 +435,7 @@ export function InboxListPane({ {isReminders ? (
{reminderPubkey ? ( @@ -444,7 +444,7 @@ export function InboxListPane({
) : (
diff --git a/desktop/tests/e2e/home-collapsed-top-chrome.spec.ts b/desktop/tests/e2e/home-collapsed-top-chrome.spec.ts index 92dd9c52b..d441454e1 100644 --- a/desktop/tests/e2e/home-collapsed-top-chrome.spec.ts +++ b/desktop/tests/e2e/home-collapsed-top-chrome.spec.ts @@ -37,14 +37,34 @@ test.describe("home inbox header collapsed-sidebar chrome clearance", () => { await expect(page.getByTestId("home-inbox-detail")).toBeVisible(); const homeInbox = page.getByTestId("home-inbox"); + const listScroller = page.getByTestId("home-inbox-list"); + const detailScroller = page.getByTestId("home-inbox-detail-scroll"); + const firstInboxItem = page + .locator('[data-testid^="home-inbox-item-"]') + .first(); + const selectedMessage = page.getByTestId("home-inbox-selected-message"); const sharedBackdrop = page.getByTestId( "home-inbox-shared-header-backdrop", ); await expect(sharedBackdrop).toHaveCount(1); + await expect(firstInboxItem).toBeVisible(); + await expect(selectedMessage).toBeVisible(); - const [homeBox, backdropBox, backdropFilter] = await Promise.all([ + const [ + homeBox, + backdropBox, + listScrollerBox, + detailScrollerBox, + firstInboxItemBox, + selectedMessageBox, + backdropFilter, + ] = await Promise.all([ homeInbox.boundingBox(), sharedBackdrop.boundingBox(), + listScroller.boundingBox(), + detailScroller.boundingBox(), + firstInboxItem.boundingBox(), + selectedMessage.boundingBox(), sharedBackdrop.evaluate( (element) => getComputedStyle(element).backdropFilter, ), @@ -52,10 +72,26 @@ test.describe("home inbox header collapsed-sidebar chrome clearance", () => { expect(homeBox).not.toBeNull(); expect(backdropBox).not.toBeNull(); + expect(listScrollerBox).not.toBeNull(); + expect(detailScrollerBox).not.toBeNull(); + expect(firstInboxItemBox).not.toBeNull(); + expect(selectedMessageBox).not.toBeNull(); expect(Math.round(backdropBox?.x ?? 0)).toBe(Math.round(homeBox?.x ?? 0)); expect(Math.round(backdropBox?.width ?? 0)).toBe( Math.round(homeBox?.width ?? 0), ); + expect(Math.round(listScrollerBox?.y ?? 0)).toBe( + Math.round(backdropBox?.y ?? 0), + ); + expect(Math.round(detailScrollerBox?.y ?? 0)).toBe( + Math.round(backdropBox?.y ?? 0), + ); + expect(Math.round(firstInboxItemBox?.y ?? 0)).toBeGreaterThanOrEqual( + Math.round((backdropBox?.y ?? 0) + (backdropBox?.height ?? 0)), + ); + expect(Math.round(selectedMessageBox?.y ?? 0)).toBeGreaterThanOrEqual( + Math.round((backdropBox?.y ?? 0) + (backdropBox?.height ?? 0)), + ); expect(backdropFilter).not.toBe("none"); await waitForAnimations(page);