Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/AI-USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ the part that matters most.
| 2026-11-12 | rachelks | Codex (ChatGPT) | Assisted with implementing search history (#24), including the GraphQL schema, database migration, backend logic and PostgreSQL tests. The implementation and test results were thoroughly reviewed throughout the process. |
| 2026-11-13 | rachelks | Codex (ChatGPT) | Assisted with #24 frontend integration, dropdown keyboard navigation, accessibility and tests, as well as debugging React/Apollo warnings and simplifying the SearchForm/DiscoveryPage responsibilities. All changes were thoroughly reviewed and tested before committing. |
| 2026-11-13 | robertky | Codex (ChatGPT) | Assisted me with #26: polished the README, added screenshots and project-document links, and verified the local setup from a clean clone. I reviewed the changes and updated the implementation notes to reflect merged browsing and country-filter features. |
| 2026-11-17 | erikhfj | Antigravity | #91, E2E search helper fix: updated `e2e/tests/search.spec.ts` to match the `Search` and `Filters` buttons with `exact: true` so `Clear recent searches` does not trigger a strict-mode violation, and cleared `E2E_USER_ID`'s recorded search history during cleanup. Verified locally with two consecutive full `pnpm test:e2e` runs against a throwaway seeded PostgreSQL stack. |

## Notes

Expand Down
16 changes: 13 additions & 3 deletions e2e/tests/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const E2E_USER_ID = '00000000-0000-4000-8000-000000000e2e';

async function search(page: Page, query: string) {
await page.getByRole('combobox', { name: 'Search by album or artist' }).fill(query);
await page.getByRole('button', { name: 'Search' }).click();
// Exact match avoids matching the "Clear recent searches" button once history opens.
await page.getByRole('button', { name: 'Search', exact: true }).click();
}

function resultTitles(page: Page) {
Expand All @@ -42,10 +43,12 @@ test('search, filter, sort, open an album and keep a review across a reload', as
);

// Filter: the decade facet is computed over the whole result set.
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByRole('button', { name: 'Filters', exact: true }).click();
await page.getByRole('checkbox', { name: /1960s/ }).check();
await expect(page).toHaveURL(/[?&]decades=1960/);
await expect(page.getByRole('button', { name: 'Filters (1)' })).toBeVisible();
await expect(
page.getByRole('button', { name: 'Filters (1)', exact: true }),
).toBeVisible();
await page.keyboard.press('Escape');

// Sort: both directions, so the test cannot pass by accident on insertion order.
Expand Down Expand Up @@ -101,6 +104,13 @@ test('search, filter, sort, open an album and keep a review across a reload', as
await expect(page.getByRole('combobox', { name: 'Sort by' })).toHaveValue('TITLE_ASC');
await expect(resultTitles(page)).toHaveText(['Abbey Road', 'Revolver']);

// Clear the fixed user's recorded search so repeated runs start with clean history.
await page.getByRole('combobox', { name: 'Search by album or artist' }).click();
await page.getByRole('button', { name: 'Clear recent searches', exact: true }).click();
await expect(page.getByRole('status', { name: 'Search history status' })).toHaveText(
'Recent searches cleared.',
);

// Clean up so repeated runs do not pile reviews onto the shared catalog.
await page.getByRole('link', { name: 'Abbey Road' }).click();
await page.getByRole('button', { name: 'Delete review' }).click();
Expand Down