fix(e2e): scroll the detail-page chart into view before asserting visibility
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m41s
PR Checks / Backend Smoke (pull_request) Successful in 5s
PR Checks / Build Backend (no push) (pull_request) Successful in 10s
PR Checks / Build Frontend (no push) (pull_request) Successful in 55s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 34s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m41s
PR Checks / Backend Smoke (pull_request) Successful in 5s
PR Checks / Build Backend (no push) (pull_request) Successful in 10s
PR Checks / Build Frontend (no push) (pull_request) Successful in 55s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 34s
The canvas renders below the fold and stays 'hidden' to Playwright until scrolled to; wait for attachment, scroll, then assert. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PqGhF93UrpDNvXBLMjJENL
This commit is contained in:
@@ -43,8 +43,13 @@ test('school detail page renders name and performance data', async ({ page }) =>
|
|||||||
await firstSchool.click();
|
await firstSchool.click();
|
||||||
await page.waitForURL(/\/school\//);
|
await page.waitForURL(/\/school\//);
|
||||||
await expect(page.locator('h1').first()).toBeVisible();
|
await expect(page.locator('h1').first()).toBeVisible();
|
||||||
// The detail page renders at least one chart canvas (performance history)
|
// The detail page renders at least one chart canvas (performance history).
|
||||||
await expect(page.locator('canvas').first()).toBeVisible({ timeout: 15_000 });
|
// Charts live below the fold and only become visible once scrolled to, so
|
||||||
|
// wait for the element, scroll it into view, then assert visibility.
|
||||||
|
const chart = page.locator('canvas').first();
|
||||||
|
await chart.waitFor({ state: 'attached', timeout: 15_000 });
|
||||||
|
await chart.scrollIntoViewIfNeeded();
|
||||||
|
await expect(chart).toBeVisible({ timeout: 15_000 });
|
||||||
});
|
});
|
||||||
|
|
||||||
test('comparing two schools shows both side by side', async ({ page }) => {
|
test('comparing two schools shows both side by side', async ({ page }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user