Add enforcedAuthType setting (#6564)

This commit is contained in:
christine betts
2025-09-03 15:33:37 -07:00
committed by GitHub
parent 5cc23f0cd8
commit 987f08a619
10 changed files with 194 additions and 18 deletions
@@ -427,4 +427,47 @@ describe('AuthDialog', () => {
expect(onSelect).toHaveBeenCalledWith(undefined, SettingScope.User);
unmount();
});
describe('enforcedAuthType', () => {
it('should display the enforced auth type message if enforcedAuthType is set', () => {
const settings: LoadedSettings = new LoadedSettings(
{
settings: {
security: {
auth: {
enforcedType: AuthType.USE_VERTEX_AI,
},
},
},
path: '',
},
{
settings: {
security: {
auth: {
selectedType: AuthType.USE_VERTEX_AI,
},
},
},
path: '',
},
{
settings: {},
path: '',
},
{
settings: {},
path: '',
},
true,
new Set(),
);
const { lastFrame } = renderWithProviders(
<AuthDialog onSelect={() => {}} settings={settings} />,
);
expect(lastFrame()).toContain('1. Vertex AI');
});
});
});