From f2473d67b42d7343f4a82d6197b6c4934238fce5 Mon Sep 17 00:00:00 2001 From: Coracle-Bot Date: Tue, 22 Sep 2026 13:59:14 +0000 Subject: [PATCH] Read US-044 permalink off the query parameter it moved to --- e2e/specs/articles-threads.spec.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/e2e/specs/articles-threads.spec.ts b/e2e/specs/articles-threads.spec.ts index 869f9934..1a1f6dd8 100644 --- a/e2e/specs/articles-threads.spec.ts +++ b/e2e/specs/articles-threads.spec.ts @@ -911,14 +911,13 @@ test("US-044 navigate a long thread", async ({seed, as}) => { await oldestPost.getByRole("button", {name: "Permalink"}).click() await expect(bob.getByRole("alert")).toContainText("Copied to clipboard!") - const permalink = await bob.evaluate(() => navigator.clipboard.readText()) - const {pathname, hash} = new URL(permalink) + const permalink = new URL(await bob.evaluate(() => navigator.clipboard.readText())) - expect(pathname).toBe(threadPath) - expect(hash).toBe(`#${nip19.neventEncode({id: firstReply.id, relays: [url]})}`) + expect(permalink.pathname).toBe(threadPath) + expect(permalink.search).toBe(`?event=${nip19.neventEncode({id: firstReply.id, relays: [url]})}`) // A permalink reaches back as far as it has to on its own, so carol never sees the control. - const carol = await as(users.carol, pathname + hash) + const carol = await as(users.carol, permalink.pathname + permalink.search) const target = carol.locator(`[data-event="${firstReply.id}"]`) await expect(target).toBeVisible()