mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
feat: turn session recording into a plugin (B13)
This commit is contained in:
1 parent
a276f6898c
commit
0af2c94983
147 files changed
+25915
-2074
No files matched your search
@@ -1,20 +0,0 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { parseAsciicast } from "../../../features/session-recording/asciicast";
|
||||
|
||||
describe("parseAsciicast", () => {
|
||||
it("parses terminal dimensions and timed input/output", () => {
|
||||
const recording = parseAsciicast(
|
||||
'{"version":2,"width":120,"height":30}\n[0.1,"o","hello"]\n[1.5,"i","ls\\r"]\n[2,"r","100x40"]\n',
|
||||
);
|
||||
expect(recording.width).toBe(120);
|
||||
expect(recording.height).toBe(30);
|
||||
expect(recording.duration).toBe(2);
|
||||
expect(recording.events).toHaveLength(3);
|
||||
});
|
||||
|
||||
it("rejects unsupported recording versions", () => {
|
||||
expect(() => parseAsciicast('{"version":1}\n')).toThrow(
|
||||
"Unsupported asciicast version",
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -50,7 +50,8 @@ describe("RAIL_ITEMS", () => {
|
||||
// from this one list.
|
||||
// "sftp" moved to the file-manager plugin's own registerRailItem,
|
||||
// "port-forwarding" to the tunnels plugin's, "serial" to the serial
|
||||
// plugin's, and "collab" to the session-sharing plugin's.
|
||||
// plugin's, "collab" to the session-sharing plugin's, and "session-logs"
|
||||
// to the session-recording plugin's.
|
||||
expect(RAIL_ITEMS.map((item) => item.id)).toEqual([
|
||||
"hosts",
|
||||
"credentials",
|
||||
@@ -59,7 +60,6 @@ describe("RAIL_ITEMS", () => {
|
||||
"quick-connect",
|
||||
"ssh-tools",
|
||||
"macros",
|
||||
"session-logs",
|
||||
"split-screen",
|
||||
]);
|
||||
});
|
||||
@@ -81,7 +81,7 @@ describe("RAIL_ITEMS", () => {
|
||||
[...RAIL_ITEMS, ...RAIL_UTILITY_ITEMS]
|
||||
.filter((item) => item.promotable)
|
||||
.map((item) => item.id),
|
||||
).toEqual(["termix-id", "ssh-tools", "macros", "session-logs"]);
|
||||
).toEqual(["termix-id", "ssh-tools", "macros"]);
|
||||
});
|
||||
|
||||
it("derives promotableIds from the promotable flag", () => {
|
||||
@@ -118,12 +118,7 @@ describe("RAIL_ITEMS", () => {
|
||||
});
|
||||
|
||||
it("only offers reference panels in the right dock", () => {
|
||||
expect(rightDockableIds()).toEqual([
|
||||
"connections",
|
||||
"ssh-tools",
|
||||
"macros",
|
||||
"session-logs",
|
||||
]);
|
||||
expect(rightDockableIds()).toEqual(["connections", "ssh-tools", "macros"]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user