fix(search): match primary phases by their words, not exact labels
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m14s
PR Checks / Backend Smoke (pull_request) Successful in 10s
PR Checks / Build Backend (no push) (pull_request) Successful in 17s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m20s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 12s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 18s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m14s
PR Checks / Backend Smoke (pull_request) Successful in 10s
PR Checks / Build Backend (no push) (pull_request) Successful in 17s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m20s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 12s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 18s
The secondary-only filters were hidden for an exact set of lowercased labels, so a change of case, hyphen or spacing in a GIAS phase label would have left them showing. Phases are now matched on their words, as compareGroups already reads "primary". The E2E journey no longer counts school types: it asserts that choosing one leaves the same list on offer, whatever the data holds. A test now pins that a filter with no options is left out, not shown with only its "any" option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0cc4f52816
commit
68452681f8
3 files changed
+26
-9
No files matched your search
@@ -296,11 +296,13 @@ test('school type and gender switch straight to another value', async ({ page })
|
||||
await gender.selectOption('boys');
|
||||
await expect(page).toHaveURL(/[?&]gender=boys(&|$)/);
|
||||
|
||||
// Whatever types the data holds, choosing one leaves the same list on offer.
|
||||
const type = page.getByRole('combobox', { name: 'School type', exact: true });
|
||||
const [first] = (await type.locator('option').allTextContents()).slice(1);
|
||||
await type.selectOption(first);
|
||||
const offered = await type.locator('option').allTextContents();
|
||||
expect(offered.length, 'no school type to choose').toBeGreaterThan(1);
|
||||
await type.selectOption(offered[1]);
|
||||
await expect(page).toHaveURL(/[?&]school_type=/);
|
||||
await expect.poll(() => type.locator('option').count()).toBeGreaterThan(2);
|
||||
await expect.poll(() => type.locator('option').allTextContents()).toEqual(offered);
|
||||
});
|
||||
|
||||
test('a phase outside primary/secondary filters to that phase, not to everything', async ({ page }) => {
|
||||
|
||||
Reference in new issue
Block a user