Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(desktop): close two holes in the model selector tag guards
Alfredo Lopez33221b48bbca
diff --git a/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.ts b/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.tsindex 84b61166f..ea9bd6404 100644--- a/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.ts+++ b/desktop-app/test/e2e-playwright/qa-recorder-image-capabilities.spec.ts@@ -287,9 +287,13 @@ async function selectModel(await expect(row).toHaveCount(1)await expect(row).toBeVisible()await expect(row).toHaveAttribute('role', 'menuitemradio')- // The row shows the model name and nothing else (#735). Asserting that keeps- // a reintroduced tag from slipping back in unnoticed.+ // The row shows the model name and nothing else (#735). Two assertions,+ // because either one alone has a hole: the class check misses a tag+ // reintroduced under a new class name, and the structural check misses a tag+ // that is not a span. A row renders exactly one span — the label — plus an+ // optional check svg on the active row.await expect(row.locator('.model-selector-item-tag')).toHaveCount(0)+ await expect(row.locator('span')).toHaveCount(1)await row.click()// State oracle: the chip now reports the model the catalog selected.@@ -297,7 +301,12 @@ async function selectModel(// Selection identity can render before capability refresh settles. Assert// the selected model's visible capability before attempting the next action.if (imageState === 'supported') {- await expect(modelChip(page)).not.toHaveAttribute('title', /cannot receive|not verified/i)+ // Assert the attribute is absent, not merely non-matching: a chip that+ // rendered a malformed or reworded hint would slip past a regex negation.+ // `imageHint` is undefined only in the supported state, so React omits both+ // attributes — the same contract the unit suite pins on the chip.+ await expect(modelChip(page)).not.toHaveAttribute('title')+ await expect(modelChip(page)).not.toHaveAttribute('aria-describedby')} else {await expect(modelChip(page)).toHaveAttribute('title',diff --git a/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsx b/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsxindex 406f68c4e..e57c19296 100644--- a/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsx+++ b/desktop-app/ui/src/components/agents/__tests__/ModelSelector.test.tsx@@ -186,6 +186,13 @@ describe('ModelSelector', () => {expect(screen.queryByText('images')).toBeNull()expect(screen.queryByText('no images')).toBeNull()expect(screen.queryByText('images not verified')).toBeNull()++ // Structural premise the Playwright image-capability spec asserts on the+ // live app: a row is one span (the label) plus, on the active row, the+ // check svg. Pinned here because this suite can actually run it.+ expect(optionOf(/Opus 4\.8/).querySelectorAll('span')).toHaveLength(1)+ expect(optionOf(/Haiku 4\.5/).querySelectorAll('span')).toHaveLength(1)+ expect(optionOf(/Sonnet 5/).querySelectorAll('span')).toHaveLength(1)})it('shows the effective model (sessionModel over hostDefault)', () => {