fix(core): fix target block cannot be reached when clicking affine-link multiple times (#10473)

Closes: [BS-2702](https://linear.app/affine-design/issue/BS-2702/超链接无法滚动到指定block)
This commit is contained in:
fundon
2025-04-01 14:46:34 +00:00
parent d8997576a5
commit 8427293d36
4 changed files with 73 additions and 2 deletions

View File

@@ -142,5 +142,9 @@ test('ctrl click embedded doc link and open in new tab', async ({ page }) => {
}),
]);
await expect(newTabPage).toHaveURL(newPageUrl, { timeout: 15000 });
const newTabPageUrl = new URL(newTabPage.url());
// ignores `search params`
newTabPageUrl.search = '';
expect(newTabPageUrl.toString()).toBe(newPageUrl);
});