diff options
| author | Adam <[email protected]> | 2026-01-22 06:50:04 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-22 07:34:44 -0600 |
| commit | c031139b89dcc8962b38ead078aff7b4653adf54 (patch) | |
| tree | 5e99272c84ce526413517d4308a8c83da854536a /specs | |
| parent | 710dc4fa94c8023fbbead371b3bd1ba4764ed398 (diff) | |
| download | opencode-c031139b89dcc8962b38ead078aff7b4653adf54.tar.gz opencode-c031139b89dcc8962b38ead078aff7b4653adf54.zip | |
test(app): model picker smoke test
Diffstat (limited to 'specs')
| -rw-r--r-- | specs/08-app-e2e-smoke-suite.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/specs/08-app-e2e-smoke-suite.md b/specs/08-app-e2e-smoke-suite.md index 3447c18c0..1a7a7a7dc 100644 --- a/specs/08-app-e2e-smoke-suite.md +++ b/specs/08-app-e2e-smoke-suite.md @@ -24,7 +24,7 @@ Add 6 smoke tests to `packages/app/e2e/`: - [x] 1. Settings dialog open / switch / close (`packages/app/e2e/settings.spec.ts`) - [x] 2. Prompt slash command path: `/open` opens file picker (`packages/app/e2e/prompt-slash-open.spec.ts`) - [x] 3. Prompt @mention inserts a file pill token (`packages/app/e2e/prompt-mention.spec.ts`) -- [ ] 4. Model selection UI works end-to-end +- [x] 4. Model selection UI works end-to-end (`packages/app/e2e/model-picker.spec.ts`) - [ ] 5. File viewer renders real file content - [ ] 8. Terminal init + create new terminal @@ -162,10 +162,11 @@ Steps: 1. `await gotoSession()`. 2. Focus prompt, type `/model`, press `Enter`. -3. In the model dialog, use the search field to filter to a deterministic model, e.g. `qwen3-coder`. -4. Select the first matching model. -5. Assert dialog closed. -6. Assert the prompt footer now shows the chosen model name. +3. In the model dialog, pick a visible model that is not the current selection (if available). +4. Use the search field to filter to that model (use its id from the list item's `data-key` to avoid time-based model visibility drift). +5. Select the filtered model. +6. Assert dialog closed. +7. Assert the prompt footer now shows the chosen model name. Acceptance criteria: @@ -217,7 +218,7 @@ These tests run with `fullyParallel: true` in `packages/app/playwright.config.ts - Avoid ordering-based assertions: never assume a “first” session/project/file is stable unless you filtered by unique text. - Prefer deterministic targets: - use `packages/app/package.json` rather than bare `package.json` (multiple hits possible) - - filter model search to a specific id/name (e.g. `qwen3-coder`) + - for models, avoid hardcoding a single model id; pick from the visible list and filter by its `data-key` instead - Prefer robust selectors: - role selectors: `getByRole('dialog')`, `getByRole('textbox')`, `getByRole('tab')` - stable data attributes already present: `promptSelector`, `[data-component="terminal"]` |
