test: plugin install + docker e2e
This commit is contained in:
@@ -13,4 +13,32 @@ describe("config schema", () => {
|
||||
expect(res.version).toBeTruthy();
|
||||
expect(res.generatedAt).toBeTruthy();
|
||||
});
|
||||
|
||||
it("merges plugin ui hints", () => {
|
||||
const res = buildConfigSchema({
|
||||
plugins: [
|
||||
{
|
||||
id: "voice-call",
|
||||
name: "Voice Call",
|
||||
description: "Outbound voice calls",
|
||||
configUiHints: {
|
||||
provider: { label: "Provider" },
|
||||
"twilio.authToken": { label: "Auth Token", sensitive: true },
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
expect(res.uiHints["plugins.entries.voice-call"]?.label).toBe("Voice Call");
|
||||
expect(res.uiHints["plugins.entries.voice-call.config"]?.label).toBe(
|
||||
"Voice Call Config",
|
||||
);
|
||||
expect(
|
||||
res.uiHints["plugins.entries.voice-call.config.twilio.authToken"]?.label,
|
||||
).toBe("Auth Token");
|
||||
expect(
|
||||
res.uiHints["plugins.entries.voice-call.config.twilio.authToken"]
|
||||
?.sensitive,
|
||||
).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user