feat(remote-desktop): expose display zoom controls for RDP (#1514)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-09-30 09:45:49 -05:00
1 parent 12a373e598
commit a1f72b9e53
2 files changed
+11 -4

No files matched your search

@@ -385,7 +385,7 @@ export const GuacamoleToolbar: React.FC<GuacamoleToolbarProps> = ({
</>
)}
{protocol === "vnc" && (
{isRdpVnc && (
<>
<div className={SEP} />
<TipIconBtn
@@ -54,7 +54,9 @@ describe("GuacamoleToolbar Windows key", () => {
expect(sendKey).toHaveBeenCalledWith(0xffeb, true);
});
it("exposes VNC zoom controls without showing them for RDP", () => {
it.each(["vnc", "rdp"] as const)(
"exposes working zoom controls for %s",
(protocol) => {
const zoomIn = vi.fn(() => 1.25);
const zoomOut = vi.fn(() => 0.75);
const resetZoom = vi.fn(() => 1);
@@ -73,7 +75,11 @@ describe("GuacamoleToolbar Windows key", () => {
} satisfies GuacamoleDisplayHandle,
} as React.RefObject<GuacamoleDisplayHandle>;
const { getByLabelText, getByText } = render(
<GuacamoleToolbar displayRef={displayRef} protocol="vnc" zoom={1.25} />,
<GuacamoleToolbar
displayRef={displayRef}
protocol={protocol}
zoom={1.25}
/>,
);
fireEvent.click(getByLabelText("remoteDesktop.toolbar.zoomOut"));
@@ -82,7 +88,8 @@ describe("GuacamoleToolbar Windows key", () => {
expect(zoomOut).toHaveBeenCalledOnce();
expect(zoomIn).toHaveBeenCalledOnce();
expect(resetZoom).toHaveBeenCalledOnce();
});
},
);
it("offers an explicit session-only hide action", () => {
const onHide = vi.fn();