From a90aa21263b31a1bda9804d771c4e1d172a48f4e Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Thu, 5 Nov 2026 00:45:58 +0100 Subject: [PATCH] test(cli-rs): compare acp --login with TS under a PTY The scenario reuses C.8's sandbox registration of the fake server and C.5's integration routes and URL sink, so no real service or account is touched. --- .../cli-rs/parity/scenarios/C.12/login.pty.ts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/cli-rs/parity/scenarios/C.12/login.pty.ts diff --git a/packages/cli-rs/parity/scenarios/C.12/login.pty.ts b/packages/cli-rs/parity/scenarios/C.12/login.pty.ts new file mode 100644 index 00000000000..d35f5f1b95c --- /dev/null +++ b/packages/cli-rs/parity/scenarios/C.12/login.pty.ts @@ -0,0 +1,38 @@ +// `acp --login` (AC02): runs `auth login` with no target. The command finds the registered fake service +// (C.8's sandbox registration, so no real service or account is touched), opens the integration picker, +// and connects Acme through its external method with the form answers. URL opens go to C.5's sink. +import { definePty } from "../../pty/run" +import { integrationRoutes, sink } from "../C.5/fixture" +import { down, enter, first, press } from "../C.5/keys" +import { env, info, only, register } from "../C.8/fixture" + +export default definePty({ + args: [], + command: only(["acp", "--login"]), + cols: 100, + rows: 40, + env: { ...env, ...sink }, + setup: register, + server: { + version: false, + routes: [ + info([]), + ...integrationRoutes(), + { method: "POST", path: "/api/integration/acme/connect/external", status: 204 }, + ], + }, + steps: [ + first("Select integration", "picker"), + press("acme", "filtered"), + press(enter, "region", "Region"), + press(down + enter, "team", "Team"), + press("core" + enter, "seats", "Seats"), + press("3" + enter, "beta", "Beta features"), + press(enter, "scopes", "Scopes"), + press(enter, "residency", "Data residency"), + press("yes" + enter, "done", "Done"), + ], + osc: [], + exits: true, + requests: true, +})