mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-11 01:01:13 +00:00
test(tasks): add task-flow operator coverage (#59683)
This commit is contained in:
@@ -381,4 +381,21 @@ describe("registerStatusHealthSessionsCommands", () => {
|
||||
runtime,
|
||||
);
|
||||
});
|
||||
|
||||
it("uses TaskFlow wording for the alias command help", () => {
|
||||
const program = new Command();
|
||||
registerStatusHealthSessionsCommands(program);
|
||||
|
||||
const flowsCommand = program.commands.find((command) => command.name() === "flows");
|
||||
expect(flowsCommand?.description()).toContain("TaskFlow");
|
||||
expect(flowsCommand?.commands.find((command) => command.name() === "list")?.description()).toBe(
|
||||
"List tracked TaskFlows",
|
||||
);
|
||||
expect(flowsCommand?.commands.find((command) => command.name() === "show")?.description()).toBe(
|
||||
"Show one TaskFlow by flow id or owner key",
|
||||
);
|
||||
expect(
|
||||
flowsCommand?.commands.find((command) => command.name() === "cancel")?.description(),
|
||||
).toBe("Cancel a running TaskFlow");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -460,7 +460,7 @@ export function registerStatusHealthSessionsCommands(program: Command) {
|
||||
|
||||
flowsCmd
|
||||
.command("list")
|
||||
.description("List tracked background flows")
|
||||
.description("List tracked TaskFlows")
|
||||
.option("--json", "Output as JSON", false)
|
||||
.option(
|
||||
"--status <name>",
|
||||
@@ -481,7 +481,7 @@ export function registerStatusHealthSessionsCommands(program: Command) {
|
||||
|
||||
flowsCmd
|
||||
.command("show")
|
||||
.description("Show one background flow by flow id or owner key")
|
||||
.description("Show one TaskFlow by flow id or owner key")
|
||||
.argument("<lookup>", "Flow id or owner key")
|
||||
.option("--json", "Output as JSON", false)
|
||||
.action(async (lookup, opts, command) => {
|
||||
@@ -499,7 +499,7 @@ export function registerStatusHealthSessionsCommands(program: Command) {
|
||||
|
||||
flowsCmd
|
||||
.command("cancel")
|
||||
.description("Cancel a running background flow")
|
||||
.description("Cancel a running TaskFlow")
|
||||
.argument("<lookup>", "Flow id or owner key")
|
||||
.action(async (lookup) => {
|
||||
await runCommandWithRuntime(defaultRuntime, async () => {
|
||||
|
||||
Reference in New Issue
Block a user