mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25:24 +00:00
feat: convert ssh tunnels into a plugin
This commit is contained in:
1 parent
c85c1fdb86
commit
1682861853
220 files changed
+36928
-11374
No files matched your search
@@ -25,9 +25,6 @@ vi.mock("react-i18next", () => ({
|
||||
vi.mock("@/settings/RemoteSyncPanel.tsx", () => ({
|
||||
RemoteSyncPanel: () => null,
|
||||
}));
|
||||
vi.mock("@/user/C2STunnelPresetManager", () => ({
|
||||
C2STunnelPresetManager: () => null,
|
||||
}));
|
||||
vi.mock("@/i18n/i18n", () => ({
|
||||
changeAppLanguage: vi.fn(),
|
||||
normalizeLanguageCode: (code: string) => code,
|
||||
|
||||
@@ -12,7 +12,7 @@ const ALL_GROUPS = new Set<FieldGroup>([
|
||||
"connection",
|
||||
"notes",
|
||||
"tags",
|
||||
"tunnels",
|
||||
"proxy",
|
||||
"jumpHosts",
|
||||
"quickActions",
|
||||
"featureFlags",
|
||||
|
||||
@@ -48,11 +48,11 @@ describe("RAIL_ITEMS", () => {
|
||||
// Guards against a destination silently disappearing now that the rail,
|
||||
// the settings toggles, the sidebar titles and the mobile bar all read
|
||||
// from this one list.
|
||||
// "sftp" moved to the file-manager plugin's own registerRailItem.
|
||||
// "sftp" moved to the file-manager plugin's own registerRailItem, and
|
||||
// "port-forwarding" to the tunnels plugin's.
|
||||
expect(RAIL_ITEMS.map((item) => item.id)).toEqual([
|
||||
"hosts",
|
||||
"credentials",
|
||||
"port-forwarding",
|
||||
"termix-id",
|
||||
"connections",
|
||||
"collab",
|
||||
|
||||
@@ -60,6 +60,7 @@ const baseHost: Host = {
|
||||
enableTerminal: true,
|
||||
enableCommandHistory: true,
|
||||
enableTunnel: true,
|
||||
enableTmuxMonitor: true,
|
||||
enableFileManager: true,
|
||||
enableDocker: true,
|
||||
enableRdp: true,
|
||||
@@ -219,16 +220,16 @@ describe("HostItem density parity", () => {
|
||||
|
||||
it("learns repeated local actions and preloads the preferred host tool", () => {
|
||||
renderHostItem("comfortable");
|
||||
const tunnelButton = screen.getByTitle("Tunnel");
|
||||
fireEvent.click(tunnelButton);
|
||||
fireEvent.click(tunnelButton);
|
||||
fireEvent.click(tunnelButton);
|
||||
const tmuxButton = screen.getByTitle("Tmux Monitor");
|
||||
fireEvent.click(tmuxButton);
|
||||
fireEvent.click(tmuxButton);
|
||||
fireEvent.click(tmuxButton);
|
||||
|
||||
const hostRow = screen.getByText("web-01").closest(".cursor-pointer");
|
||||
expect(hostRow).toBeTruthy();
|
||||
fireEvent.pointerEnter(hostRow!);
|
||||
|
||||
expect(preloadTabSurfaceMock).toHaveBeenCalledWith("terminal");
|
||||
expect(preloadTabSurfaceMock).toHaveBeenCalledWith("tunnel");
|
||||
expect(preloadTabSurfaceMock).toHaveBeenCalledWith("tmux_monitor");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user