mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
feat: wire ai, automations, fleets and ssh-terminal to snippets (B2)
This commit is contained in:
1 parent
3656caf168
commit
c77301577f
16 files changed
+473
-52
No files matched your search
@@ -50,4 +50,27 @@ describe(`${manifest.id} activate`, () => {
|
||||
expect(app.registered.settingsComponents()).toEqual([]);
|
||||
expect(app.registered.actions()).toEqual([]);
|
||||
});
|
||||
|
||||
it("registers the terminal session actions snippets and other plugins call into", async () => {
|
||||
rendered = await renderWithApp(plugin, { manifest, locales });
|
||||
expect(rendered.registered.actions()).toEqual(
|
||||
expect.arrayContaining([
|
||||
"terminal.listSessions",
|
||||
"terminal.sendToActive",
|
||||
"terminal.sendToSession",
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
it("terminal.sendToActive and terminal.listSessions report no session when none is registered", async () => {
|
||||
rendered = await renderWithApp(plugin, { manifest, locales });
|
||||
await expect(
|
||||
rendered.app.invokeAction("terminal.listSessions"),
|
||||
).resolves.toEqual([]);
|
||||
await expect(
|
||||
rendered.app.invokeAction("terminal.sendToActive", "echo hi", {
|
||||
run: true,
|
||||
}),
|
||||
).resolves.toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user