mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
fix: expose server identity and refine KAAK client
This commit is contained in:
1 parent
e8164abafe
commit
17fb27b89a
28 files changed
+1504
-334
No files matched your search
@@ -119,6 +119,25 @@ test("custom surfaces can safely render and switch unified favorite and recent s
|
||||
errorCode(() => parseSkinPluginDocument(document), "SKIN_PLUGIN_PERMISSION_MISSING");
|
||||
});
|
||||
|
||||
test("server list skins may display only the host-provided TeamSpeak icon image", () => {
|
||||
const document = validDocument();
|
||||
document.schemaVersion = 3;
|
||||
document.components[0].actions = {};
|
||||
document.components[0].permissions = ["servers.quickList.read"];
|
||||
document.components[0].root = {
|
||||
tag: "nav",
|
||||
repeat: { path: "servers.quickList", as: "server" },
|
||||
children: [{ tag: "img", attributes: { src: "{{server.icon}}", alt: "" } }],
|
||||
};
|
||||
assert.equal(parseSkinPluginDocument(document).components[0].root.children?.[0].attributes?.src, "{{server.icon}}");
|
||||
|
||||
document.components[0].root.children![0].attributes!.src = "https://example.com/icon.png";
|
||||
errorCode(() => parseSkinPluginDocument(document), "SKIN_PLUGIN_ATTRIBUTE_INVALID");
|
||||
document.components[0].root.children![0].attributes!.src = "{{server.icon}}";
|
||||
document.components[0].root.children![0].tag = "span";
|
||||
errorCode(() => parseSkinPluginDocument(document), "SKIN_PLUGIN_ATTRIBUTE_INVALID");
|
||||
});
|
||||
|
||||
test("host widget references stay allowlisted and cannot be used on the demo page", () => {
|
||||
const unknownWidget = validDocument();
|
||||
unknownWidget.schemaVersion = 2;
|
||||
|
||||
Reference in new issue
Block a user