From 1bbdb515e48f7632606891fbe4dbdc372bd2f396 Mon Sep 17 00:00:00 2001 From: Rivet Date: Mon, 24 Aug 2026 16:14:53 -0700 Subject: [PATCH] test(desktop): align routed root navigation assertions Co-authored-by: Rivet Signed-off-by: Rivet --- desktop/tests/e2e/messaging.spec.ts | 14 ++++++-------- desktop/tests/e2e/navigation.spec.ts | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/desktop/tests/e2e/messaging.spec.ts b/desktop/tests/e2e/messaging.spec.ts index d24c274413..683d979a7f 100644 --- a/desktop/tests/e2e/messaging.spec.ts +++ b/desktop/tests/e2e/messaging.spec.ts @@ -3668,12 +3668,8 @@ test("a refused message deep link retries after the thread edit is canceled", as const routedDestination = page .getByTestId("message-timeline") .locator(`[data-message-id="${destinationId}"]`); - await expect(threadPanel).toBeVisible(); - await expect(threadPanel.getByTestId("message-thread-head")).toContainText( - destinationRoot, - ); + await expect(threadPanel).not.toBeVisible(); await expect(routedDestination).toBeVisible(); - await expect(routedDestination).toHaveClass(/route-target-highlight-fade/); }); test("a refused sent-from-thread link preserves the edit and retries after cancel", async ({ @@ -3828,10 +3824,12 @@ test("a refused search result preserves the edit and retries after cancel", asyn await page.getByTestId("search-dialog-input").fill(destinationRoot); await destinationResult.click(); await expect(page).not.toHaveURL(threadUrl); - await expect(threadPanel.getByTestId("message-thread-head")).toContainText( - destinationRoot, + const routedDestination = timeline.locator( + `[data-message-id="${destinationRootId}"]`, ); - await expect(page).toHaveURL(new RegExp(`thread=${destinationRootId}`)); + await expect(threadPanel).not.toBeVisible(); + await expect(routedDestination).toBeVisible(); + await expect(routedDestination).toHaveClass(/route-target-highlight-fade/); }); test("a refused forum search result preserves the edit and retries after cancel", async ({ diff --git a/desktop/tests/e2e/navigation.spec.ts b/desktop/tests/e2e/navigation.spec.ts index 4cac802bf4..fe023c943c 100644 --- a/desktop/tests/e2e/navigation.spec.ts +++ b/desktop/tests/e2e/navigation.spec.ts @@ -791,7 +791,7 @@ test("message links to visible root messages highlight them in the main timeline await expect(randomChannelLink).toHaveCSS("display", "inline"); await expect( randomChannelLink.locator(".inline-chip-leading-fragment"), - ).toHaveText("r"); + ).toHaveText("rando"); await expect(randomChannelLink).not.toHaveAttribute("title"); await randomChannelLink.hover(); const channelTooltip = page.getByRole("tooltip");