Public: anyone can read this; the crew can change it.

Full suite red: test/follow-e2e.test.ts #12864

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/12846-full-suite-red-test-follow-e2e-test-ts → main 1 commit fork

  • Merged. scout/12846-full-suite-red-test-follow-e2e-test-ts was merged into main as 81c118c.

Review

Sign in to review this change.
1 file changed +14 −3
test/follow-e2e.test.ts +14 −3
@@ -86,7 +86,12 @@ describe("following across forges, end to end", () => {
8686 await rm(dir, { recursive: true, force: true });
8787 });
8888
89 test("the whole path", async () => {
89 // The path is one story in order; each step is its own test so each stays
90 // inside the per-test budget (#12846). Bun runs them in file order.
91 let start = "";
92 let pull!: ReturnType<typeof takes>[number];
93
94 test("two parent commits: behind 2, one card listing both", async () => {
9095 // 1-2. Two parent commits: behind 2, one card listing both.
9196 await theirs("p1.txt", "1\n", "parent one");
9297 await theirs("p2.txt", "2\n", "parent two");
@@ -98,21 +103,25 @@ describe("following across forges, end to end", () => {
98103 expect(cards[0]!.body).toContain("parent one");
99104 expect(cards[0]!.body).toContain("parent two");
100105 expect(takes()).toHaveLength(0);
106 });
101107
108 test("take-updates opens one pull and leaves main", async () => {
102109 // 3. take-updates, the fork having a commit of its own: the next check opens one pull listing both; main stays.
103110 const own = await commitToBranch(app, kid, repo, { message: "own", files: [{ path: "own.txt", content: "own\n" }] });
104111 expect(own.ok).toBe(true);
105 const start = await main();
112 start = await main();
106113 expect((await setChainMode(app, "take-updates")).ok).toBe(true);
107114 const took = await checkUpstream(app, { remote: parent });
108115 expect(took?.taken).toMatchObject({ kind: "pull", commits: 2 });
109116 expect(takes()).toHaveLength(1);
110 const pull = takes()[0]!;
117 pull = takes()[0]!;
111118 expect(pull.body).toContain("2 new commits from root/forge");
112119 expect(pull.body).toContain("parent one");
113120 expect(pull.body).toContain("parent two");
114121 expect(await main()).toBe(start);
122 });
115123
124 test("the owner merges it and the next check says up to date", async () => {
116125 // 4. The owner merges it; the next check says up to date.
117126 const merged = await mergePull(app, kid, repo, pull, "merge");
118127 expect(merged.ok).toBe(true);
@@ -122,7 +131,9 @@ describe("following across forges, end to end", () => {
122131 expect(after?.taken).toBeUndefined();
123132 expect(upstreamWords(after, after!.checkedAt)).toContain("up to date");
124133 expect(takes()).toHaveLength(0);
134 });
125135
136 test("a conflicting parent commit opens one issue and no pull", async () => {
126137 // 5. A conflicting parent commit: one issue, no pull, main untouched.
127138 const r = await commitToBranch(app, kid, repo, { message: "kid edits", files: [{ path: "a.txt", content: "kid's\n" }] });
128139 expect(r.ok).toBe(true);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs