diff --git a/e2e/tests/journeys.spec.ts b/e2e/tests/journeys.spec.ts index f955657..1a7e6ac 100644 --- a/e2e/tests/journeys.spec.ts +++ b/e2e/tests/journeys.spec.ts @@ -43,8 +43,11 @@ test('school detail page renders name and performance data', async ({ page }) => await firstSchool.click(); await page.waitForURL(/\/school\//); await expect(page.locator('h1').first()).toBeVisible(); - // The detail page renders at least one chart canvas (performance history) - await expect(page.locator('canvas').first()).toBeVisible({ timeout: 15_000 }); + // The detail page renders at least one *visible* chart canvas. Plain + // .first() is wrong here: the admissions card stacks its year/trend views + // in one grid cell and keeps the inactive view's canvas visibility:hidden + // by design, and that canvas comes first in the DOM. + await expect(page.locator('canvas:visible').first()).toBeVisible({ timeout: 15_000 }); }); test('comparing two schools shows both side by side', async ({ page }) => {