mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-11-01 08:05:23 +00:00
fix(session-sharing): use the linked server for desktop meetings and links (#1507)
This commit is contained in:
1 parent
9801cc7fc7
commit
ec7c2c2835
15 files changed
+621
-210
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { pluginWsUrl } = vi.hoisted(() => ({ pluginWsUrl: vi.fn() }));
|
||||
vi.mock("@termix/plugin-sdk/ui", () => ({ pluginWsUrl }));
|
||||
import { wsTargetForPath } from "../../src/frontend/shared";
|
||||
|
||||
describe("meeting event transport", () => {
|
||||
it("preserves remote authentication protocols and event query parameters", async () => {
|
||||
pluginWsUrl.mockResolvedValue({
|
||||
url: "wss://server/base/plugin-ws/ssh-terminal/terminal",
|
||||
protocols: ["jwt", "session-token"],
|
||||
});
|
||||
expect(
|
||||
await wsTargetForPath(
|
||||
"/plugin-ws/ssh-terminal/terminal?room=abc",
|
||||
"remote",
|
||||
),
|
||||
).toEqual({
|
||||
url: "wss://server/base/plugin-ws/ssh-terminal/terminal?room=abc",
|
||||
protocols: ["jwt", "session-token"],
|
||||
});
|
||||
expect(pluginWsUrl).toHaveBeenCalledWith("ssh-terminal", "/terminal", {
|
||||
origin: "remote",
|
||||
});
|
||||
expect(
|
||||
await wsTargetForPath("https://another-server/ws", "remote"),
|
||||
).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user