diff --git a/AGENTS.md b/AGENTS.md index 86549ef..25b1610 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,16 +58,16 @@ State variables declared with `$state('')` are set once on component mount. To k ```svelte ``` @@ -164,17 +164,18 @@ For every admin route, write BOTH: These methods are available on `page` from `vitest/browser`: -| Method | Works? | Example | -|--------|--------|---------| -| `getByRole` | ✅ | `page.getByRole('textbox', { name: 'Name' })` | -| `getByText` | ✅ | `page.getByText('Content')` | -| `getByPlaceholder` | ✅ | `page.getByPlaceholder('Email Address')` | -| `getByAltText` | ✅ | `page.getByAltText('Sign In with Google')` | -| `getByTestId` | ✅ | `page.getByTestId('tiptap-mock')` | -| `getByLabel` | ❌ | Not available in this version | -| `getByDisplayValue` | ❌ | Not available in this version | +| Method | Works? | Example | +| ------------------- | ------ | --------------------------------------------- | +| `getByRole` | ✅ | `page.getByRole('textbox', { name: 'Name' })` | +| `getByText` | ✅ | `page.getByText('Content')` | +| `getByPlaceholder` | ✅ | `page.getByPlaceholder('Email Address')` | +| `getByAltText` | ✅ | `page.getByAltText('Sign In with Google')` | +| `getByTestId` | ✅ | `page.getByTestId('tiptap-mock')` | +| `getByLabel` | ❌ | Not available in this version | +| `getByDisplayValue` | ❌ | Not available in this version | For label-identified elements, use `getByRole` with `name` option: + - Text inputs → `getByRole('textbox', { name: /^Name$/ })` - Selects → `getByRole('combobox', { name: /^Frequency$/ })` - Buttons → `getByRole('button', { name: 'Save' })` @@ -186,7 +187,9 @@ For label-identified elements, use `getByRole` with `name` option: Since `bind:value` on selects doesn't work with `$effect`-driven state, and we use `selected` on `