fix(ui): restore searchable credential model picker
Use each credential's model IDs in the model name field and filter matches while typing. Fixes #
This commit is contained in:
1 parent
9e5ed4d2d3
commit
36b98d2d0a
7 files changed
+25
-14
No files matched your search
@@ -5,19 +5,18 @@ import { I18nProvider } from '../src/i18n';
|
||||
|
||||
const html = renderToStaticMarkup(
|
||||
<I18nProvider>
|
||||
<CredentialAdvancedFields name="codex-user.json" advanced={{ model_aliases: [{ name: 'gpt-5', alias: 'public-gpt' }] }} onChange={() => {}} />
|
||||
<CredentialAdvancedFields name="codex-user.json" advanced={{ model_aliases: [{ name: 'gpt-5', alias: 'public-gpt' }] }}
|
||||
models={[{ name: 'gpt-5', alias: 'GPT 5' }]} onChange={() => {}} />
|
||||
</I18nProvider>,
|
||||
);
|
||||
|
||||
describe('credential alias editor', () => {
|
||||
it('uses plain inputs for the upstream model and client alias', () => {
|
||||
expect(html).not.toContain('role="combobox"');
|
||||
describe('credential alias model picker', () => {
|
||||
it('uses the credential model list for the upstream model and a plain input for the alias', () => {
|
||||
expect(html.match(/role="combobox"/g)).toHaveLength(1);
|
||||
expect(html).toContain('aria-label="Model name"');
|
||||
expect(html).toContain('aria-label="Model alias"');
|
||||
expect(html).toContain('value="gpt-5"');
|
||||
expect(html).toContain('value="public-gpt"');
|
||||
expect(html).toContain('aria-label="Expand"');
|
||||
expect(html).not.toContain('Display name');
|
||||
expect(html).not.toContain('Search or enter a model');
|
||||
expect(html).toContain('Search or enter a model');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user