fix(web): wait for chart render in supported-link e2e
ChartCanvas lazy-loads Plot after navigation. The supported-URL spec asserted on svg anchors immediately, so a slow CI runner could time out before marks appeared even though link handling was correct. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
This commit is contained in:
parent
63f96b6edd
commit
aaea8cebf0
@ -63,8 +63,10 @@ test("chart links retain supported URLs and browser encoding semantics", async (
|
|||||||
"java%73cript:void(0)",
|
"java%73cript:void(0)",
|
||||||
]) {
|
]) {
|
||||||
await page.goto(`${fixture}?${new URLSearchParams({ href })}`);
|
await page.goto(`${fixture}?${new URLSearchParams({ href })}`);
|
||||||
|
// ChartCanvas lazy-loads Plot; mirror the inert-link test and wait for marks first.
|
||||||
|
await expect(page.locator("svg circle").first()).toBeVisible();
|
||||||
const link = page.locator("svg a").first();
|
const link = page.locator("svg a").first();
|
||||||
await expect(link).toBeVisible();
|
await expect(link).toBeAttached();
|
||||||
expect(
|
expect(
|
||||||
await link.evaluate((anchor) =>
|
await link.evaluate((anchor) =>
|
||||||
anchor.getAttributeNS("http://www.w3.org/1999/xlink", "href"),
|
anchor.getAttributeNS("http://www.w3.org/1999/xlink", "href"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user