feat: convert wake-on-lan into a plugin (B20)

This commit is contained in:
LukeGus committed 2026-09-24 15:49:55 -05:00
1 parent d4ec444558
commit 2ac7779eda
50 files changed
+17844 -199

No files matched your search

@@ -3,19 +3,6 @@ import type { SSHHostWithStatus } from "@/main-axios";
import { sshHostToHost } from "@/sidebar/HostManagerData";
describe("sshHostToHost", () => {
it("preserves the Wake-on-LAN broadcast address for editing", () => {
const host = sshHostToHost({
id: 1,
name: "server",
ip: "192.168.0.10",
port: 22,
username: "root",
wolBroadcastAddress: "192.168.0.255",
} as SSHHostWithStatus);
expect(host.wolBroadcastAddress).toBe("192.168.0.255");
});
it.each(["local", "remote"] as const)(
"preserves the %s connection origin for editing",
(connectionOrigin) => {
@@ -36,7 +36,6 @@ vi.mock("@/hooks/use-status-color-scheme", () => ({
vi.mock("@/main-axios", () => ({
getHostPassword: vi.fn(),
wakeOnLan: vi.fn(),
}));
import { HostItem } from "../../../../sidebar/tree/HostItem/HostItem";
@@ -64,7 +63,6 @@ const baseHost: Host = {
enableRdp: true,
enableVnc: true,
enableTelnet: true,
macAddress: "aa:bb:cc:dd:ee:ff",
quickActions: [],
} as unknown as Host;
@@ -140,7 +138,6 @@ describe("HostItem density parity", () => {
0,
);
expect(screen.getAllByText("hosts.shareHost").length).toBeGreaterThan(0);
expect(screen.getByText("hosts.wakeOnLanAction")).toBeTruthy();
});
it.each(["comfortable", "compact"] as const)(
@@ -177,14 +174,6 @@ describe("HostItem density parity", () => {
},
);
it.each(["comfortable", "compact"] as const)(
"exposes the wake-on-LAN button when a MAC address is set, in %s density",
(density) => {
renderHostItem(density);
expect(screen.getByTitle("hosts.wakeOnLanAction")).toBeTruthy();
},
);
it.each(["comfortable", "compact"] as const)(
"exposes the copy-password action in %s density",
(density) => {