From 652dc072fea51b2b06fd39ba24bd1977a02203b5 Mon Sep 17 00:00:00 2001 From: Daniil Pokrovsky Date: Fri, 4 Dec 2026 22:14:47 +0700 Subject: [PATCH] feat: implement local-make-worker-doctor-try-first-task-e2e-te - Make worker-doctor try-first-task e2e test independent of host service manager --- packages/e2e/tests/local/worker-doctor.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/e2e/tests/local/worker-doctor.test.ts b/packages/e2e/tests/local/worker-doctor.test.ts index 814ace80..dc0630ab 100644 --- a/packages/e2e/tests/local/worker-doctor.test.ts +++ b/packages/e2e/tests/local/worker-doctor.test.ts @@ -328,8 +328,13 @@ test.skipIf(!builtCli)( nextSteps: Array<{ id: string; command: string }>; }; expect(document.setup).toBe("ready"); - expect(document.nextSteps.map((step) => step.id)).toEqual(["service", "try-first-task"]); - const command = document.nextSteps[1]!.command; + // The first step depends on the host: `service` with a systemd user bus, + // `run-foreground` without one (containers, sandboxes). + const ids = document.nextSteps.map((step) => step.id); + expect(["service", "run-foreground"]).toContain(ids[0]); + expect(ids).toHaveLength(2); + expect(ids[1]).toBe("try-first-task"); + const command = document.nextSteps.find((step) => step.id === "try-first-task")!.command; expect(command).toContain("devintern worker add --title "); // Run the command as written: `devintern` is a shim for the built CLI.