The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(test): correct test assertions for managed model picker behavior
Steven Enamakel5a4c29774879
diff --git a/app/src/components/settings/panels/ai/ProviderModelPickerDialog.test.tsx b/app/src/components/settings/panels/ai/ProviderModelPickerDialog.test.tsxindex 36140aa9ba..281579652a 100644--- a/app/src/components/settings/panels/ai/ProviderModelPickerDialog.test.tsx+++ b/app/src/components/settings/panels/ai/ProviderModelPickerDialog.test.tsx@@ -237,7 +237,9 @@ describe('ProviderModelPickerDialog', () => {const order = screen.getAllByRole('option')- .map(option => option.getAttribute('data-testid')?.replace('model-picker-managed-option-', ''));+ .map(option =>+ option.getAttribute('data-testid')?.replace('model-picker-managed-option-', '')+ );// Case-insensitive, and an unnamed entry sorts by its id.expect(order).toEqual(['openrouter/b/beta', 'openrouter/a/no-name', 'openrouter/z/zeta']);});diff --git a/app/test/playwright/specs/chat-model-managed-catalog.spec.ts b/app/test/playwright/specs/chat-model-managed-catalog.spec.tsindex 92a2bcd5ac..387b46aff2 100644--- a/app/test/playwright/specs/chat-model-managed-catalog.spec.ts+++ b/app/test/playwright/specs/chat-model-managed-catalog.spec.ts@@ -114,8 +114,6 @@ const modelChip = (page: Page): Locator =>const pickerTitle = (page: Page): Locator => page.getByText('Choose provider and model');const managedOption = (page: Page, id: string): Locator =>page.getByTestId(`model-picker-managed-option-${id}`);-const managedAutomatic = (page: Page): Locator =>- page.getByTestId('model-picker-managed-automatic');/*** Open the picker and land on the managed source's pane.@@ -198,7 +196,7 @@ test.describe('Managed OpenRouter catalog in the model picker', () => {// The round trip: reopen and the list still marks the pinned id.// `selectionFromValue` decoded a bare id (no `:`) to null, so the selection- // was silently dropped here and the pane reopened on "Automatic".+ // was silently dropped here and the pane reopened with nothing selected.await openManagedPane(page);await expect(managedOption(page, PLAIN_ID),