mirror of
https://github.com/block/buzz.git
synced 2026-10-30 22:11:36 +00:00
test(desktop): keep DM unread coverage viewport-safe
Co-authored-by: Rivet <a08d9a8418c7ff03afe19964724c8fd87bf1776ab9e9b9cafb8cc920edd02a6e@buzz.block.builderlab.xyz> Signed-off-by: Rivet <a08d9a8418c7ff03afe19964724c8fd87bf1776ab9e9b9cafb8cc920edd02a6e@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -2453,16 +2453,9 @@ test("sidebar clears unread indicator after opening a DM", async ({ page }) => {
|
||||
await expect(page.getByTestId("message-dm-intro")).toContainText(
|
||||
"This is the beginning of your direct message with",
|
||||
);
|
||||
// `.first()`: backdated seeds can straddle midnight UTC and render two
|
||||
// dividers (Yesterday + Today); a bare locator fails Playwright strict mode.
|
||||
await expect(
|
||||
page.getByTestId("message-timeline-day-divider").first(),
|
||||
).toBeVisible();
|
||||
await expect(page.getByTestId("message-timeline")).toContainText(
|
||||
"Unread update for the DM",
|
||||
);
|
||||
await expectSameLeftInset(page, "message-dm-intro", "message-row");
|
||||
await expectIntroSpacedAboveDayDivider(page, "message-dm-intro");
|
||||
await expect(page.getByTestId("channel-unread-alice-tyler")).toHaveCount(0);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user