fix(e2e): scroll detail-page chart into view before asserting #5
@@ -43,8 +43,11 @@ 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 *visible* chart canvas. Plain
|
||||||
await expect(page.locator('canvas').first()).toBeVisible({ timeout: 15_000 });
|
// .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 }) => {
|
test('comparing two schools shows both side by side', async ({ page }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user