fix(tui): clear onboarding after provider connect (#34819)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
co-authored by
Aiden Cline
parent
bea6e1499d
commit
02f012f5d1
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { hasConnectedProvider } from "../../src/util/connected-provider"
|
||||
|
||||
describe("hasConnectedProvider", () => {
|
||||
test("is false without integration credentials", () => {
|
||||
expect(hasConnectedProvider([])).toBe(false)
|
||||
expect(hasConnectedProvider([{ connections: [] }])).toBe(false)
|
||||
})
|
||||
|
||||
test("is true after any provider integration is connected", () => {
|
||||
expect(hasConnectedProvider([{ connections: [{ type: "credential", id: "cred_1", label: "Work" }] }])).toBe(true)
|
||||
expect(hasConnectedProvider([{ connections: [{ type: "env", name: "OPENAI_API_KEY" }] }])).toBe(true)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user