feat(kaak): render TeamSpeak server banner

This commit is contained in:
illusia committed 2026-10-11 19:50:35 +08:00
1 parent 766a9b9b5a
commit 398a4d6c7f
24 files changed
+335 -27

No files matched your search

+15 -3
View File
@@ -151,7 +151,7 @@ test("host widget references stay allowlisted and cannot be used on the demo pag
errorCode(() => parseSkinPluginDocument(demoWidget), "SKIN_PLUGIN_WIDGET_INVALID");
});
test("starting screen share from a skin host widget requires its own permission", () => {
test("starting screen share from a skin host widget requires its own permission", () => {
const document = validDocument();
document.schemaVersion = 2;
document.components[0].root = { tag: "main", children: [{ widget: "voice.screen-share-start" }] };
@@ -160,8 +160,20 @@ test("starting screen share from a skin host widget requires its own permission"
document.components[0].permissions = ["voice.screenShare.control"];
document.components[0].actions = {};
const parsed = parseSkinPluginDocument(document);
assert.equal(parsed.components[0].root.children?.[0].widget, "voice.screen-share-start");
});
assert.equal(parsed.components[0].root.children?.[0].widget, "voice.screen-share-start");
});
test("server banner host widget only exposes public session status fields", () => {
const document = validDocument();
document.schemaVersion = 3;
document.components[0].actions = {};
document.components[0].root = { tag: "main", children: [{ widget: "voice.server-banner" }] };
errorCode(() => parseSkinPluginDocument(document), "SKIN_PLUGIN_PERMISSION_MISSING");
document.components[0].permissions = ["session.status.read"];
const parsed = parseSkinPluginDocument(document);
assert.equal(parsed.components[0].root.children?.[0].widget, "voice.server-banner");
});
test("schema v3 host audio controls require read and control permissions while v2 remains compatible", () => {
const document = validDocument();