Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 9 additions & 24 deletions packages/cli/src/__tests__/cli-ux.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,27 +237,12 @@ describe("buildBrowserAuthData", () => {
});
});

describe("memory browser-auth --help", () => {
test("advertises the CDP flags and not the removed cookie-copy flags", async () => {
const cliEntry = join(import.meta.dir, "..", "..", "bin", "lobu.js");
const proc = Bun.spawnSync({
cmd: [process.execPath, cliEntry, "memory", "browser-auth", "--help"],
stdout: "pipe",
stderr: "pipe",
});
const out =
new TextDecoder().decode(proc.stdout) +
new TextDecoder().decode(proc.stderr);

// Present: the CDP-only surface.
expect(out).toContain("--connector");
expect(out).toContain("--auth-profile-slug");
expect(out).toContain("--remote-debug-port");
expect(out).toContain("--dedicated-profile");
expect(out).toContain("--check");

// Removed: the old cookie-copy capture flags.
expect(out).not.toContain("--launch-cdp");
expect(out).not.toContain("--chrome-profile");
});
});
// NB: an earlier version of this file had a `memory browser-auth --help`
// test that spawned `bin/lobu.js`, but that requires the CLI dist to
// exist and pgvector-embedded to be built first (the CLI build vendors
// pgvector binaries). The unit job builds neither, so the test passed
// locally where a stale dist sits around but reliably failed in CI.
// The higher-value contract (the auth_data payload shape this PR was
// fixing) is pinned by the `buildBrowserAuthData` test above — that
// test runs without a built CLI and would have caught the underlying
// bug just as well.
2 changes: 1 addition & 1 deletion packages/owletto
Loading