refactor(core): simplify integration credentials (#31968)

This commit is contained in:
Dax 2026-06-12 02:15:25 -04:00 committed by GitHub
commit 30aec297d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
112 changed files with 2467 additions and 47728 deletions

View file

@ -92,11 +92,11 @@ test("refreshes resources into reactive getters", async () => {
}
})
test("refreshes connectors after connector updates", async () => {
test("refreshes integrations after integration updates", async () => {
const events = createEventSource()
let requests = 0
const calls = createFetch((url) => {
if (url.pathname !== "/api/connector") return
if (url.pathname !== "/api/integration") return
requests++
return json({
location: { directory, project: { id: "proj_test", directory } },
@ -107,7 +107,7 @@ test("refreshes connectors after connector updates", async () => {
{
id: "openai",
name: "OpenAI",
methods: [{ id: "api-key", type: "key", label: "API Key" }],
methods: [{ type: "key" }],
},
],
})
@ -138,12 +138,12 @@ test("refreshes connectors after connector updates", async () => {
try {
await mounted
await wait(() => data.location.connector.list() !== undefined)
expect(data.location.connector.list()).toEqual([])
await wait(() => data.location.integration.list() !== undefined)
expect(data.location.integration.list()).toEqual([])
emitEvent(events, { id: "evt_connector", type: "connector.updated", properties: {} })
await wait(() => data.location.connector.list()?.length === 1)
expect(data.location.connector.list()?.[0]).toMatchObject({ id: "openai", name: "OpenAI" })
emitEvent(events, { id: "evt_integration", type: "integration.updated", properties: {} })
await wait(() => data.location.integration.list()?.length === 1)
expect(data.location.integration.list()?.[0]).toMatchObject({ id: "openai", name: "OpenAI" })
} finally {
app.renderer.destroy()
}