diff --git a/e2e/tests/journeys.spec.ts b/e2e/tests/journeys.spec.ts index 4df77d7..c89f3b1 100644 --- a/e2e/tests/journeys.spec.ts +++ b/e2e/tests/journeys.spec.ts @@ -172,11 +172,13 @@ test('an all-through school shows BOTH its KS2 SATs and its GCSE results, not ju // Labelled as all-through in the hero meta. await expect(page.getByText(/All-through/i).first()).toBeVisible(); - // The combined results section carries both phases. + // The combined results section carries both phases, each under its own + // all-through sub-heading (a unique visible node — unlike "Attainment 8", + // which also appears in hidden MetricTooltip labels). const results = page.locator('#results'); await expect(results.getByText(/SATs & GCSE Results/)).toBeVisible(); - await expect(results.getByText('Reading, Writing & Maths combined')).toBeVisible(); // KS2 - await expect(results.getByText('Attainment 8').first()).toBeVisible(); // KS4 + await expect(results.getByRole('heading', { name: /Primary.*KS2 SATs/ })).toBeVisible(); // KS2 block + await expect(results.getByRole('heading', { name: /Secondary.*GCSEs/ })).toBeVisible(); // KS4 block }); test('school with no performance data still gets a working detail page', async ({ page }) => {