Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion electron/server-bundle.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -254165,7 +254165,7 @@ data: ${JSON.stringify(event2.data)}
}
return Response.json({
ok: true,
message: "Config updated. Restart Claude to apply changes."
message: "Config updated. Restart Hermes to apply changes."
});
}
}
Expand Down
25 changes: 25 additions & 0 deletions src/components/settings-dialog/settings-dialog.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { describe, expect, it } from 'vitest'
import {
getOAuthStartButtonLabel,
getProviderClickAction,
} from './settings-dialog'

describe('getProviderClickAction', () => {
it('routes provider cards to the right detail panel', () => {
expect(getProviderClickAction({ authType: 'oauth', hasKey: true })).toBe('oauth')
expect(getProviderClickAction({ authType: 'none', hasKey: true })).toBe('local')
expect(getProviderClickAction({ authType: 'api_key', hasKey: true })).toBe('select')
expect(getProviderClickAction({ authType: 'api_key', hasKey: false })).toBe('ignore')
expect(
getProviderClickAction({ providerId: 'custom', authType: 'api_key', hasKey: true }),
).toBe('custom')
})
})

describe('getOAuthStartButtonLabel', () => {
it('shows Start OAuth when idle and Waiting... while the flow is active', () => {
expect(getOAuthStartButtonLabel('idle')).toBe('Start OAuth')
expect(getOAuthStartButtonLabel('starting')).toBe('Waiting...')
expect(getOAuthStartButtonLabel('pending')).toBe('Waiting...')
})
})
Loading