Public: anyone can read this; the crew can change it.
Full suite red: test/follow-e2e.test.ts #12864
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/12846-full-suite-red-test-follow-e2e-test-ts → main 1 commit fork
1 file
changed +14
−3
test/follow-e2e.test.ts +14 −3
| @@ -86,7 +86,12 @@ describe("following across forges, end to end", () => { | ||
| 86 | 86 | await rm(dir, { recursive: true, force: true }); |
| 87 | 87 | }); |
| 88 | 88 | |
| 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 () => { | |
| 90 | 95 | // 1-2. Two parent commits: behind 2, one card listing both. |
| 91 | 96 | await theirs("p1.txt", "1\n", "parent one"); |
| 92 | 97 | await theirs("p2.txt", "2\n", "parent two"); |
| @@ -98,21 +103,25 @@ describe("following across forges, end to end", () => { | ||
| 98 | 103 | expect(cards[0]!.body).toContain("parent one"); |
| 99 | 104 | expect(cards[0]!.body).toContain("parent two"); |
| 100 | 105 | expect(takes()).toHaveLength(0); |
| 106 | }); | |
| 101 | 107 | |
| 108 | test("take-updates opens one pull and leaves main", async () => { | |
| 102 | 109 | // 3. take-updates, the fork having a commit of its own: the next check opens one pull listing both; main stays. |
| 103 | 110 | const own = await commitToBranch(app, kid, repo, { message: "own", files: [{ path: "own.txt", content: "own\n" }] }); |
| 104 | 111 | expect(own.ok).toBe(true); |
| 105 | const start = await main(); | |
| 112 | start = await main(); | |
| 106 | 113 | expect((await setChainMode(app, "take-updates")).ok).toBe(true); |
| 107 | 114 | const took = await checkUpstream(app, { remote: parent }); |
| 108 | 115 | expect(took?.taken).toMatchObject({ kind: "pull", commits: 2 }); |
| 109 | 116 | expect(takes()).toHaveLength(1); |
| 110 | const pull = takes()[0]!; | |
| 117 | pull = takes()[0]!; | |
| 111 | 118 | expect(pull.body).toContain("2 new commits from root/forge"); |
| 112 | 119 | expect(pull.body).toContain("parent one"); |
| 113 | 120 | expect(pull.body).toContain("parent two"); |
| 114 | 121 | expect(await main()).toBe(start); |
| 122 | }); | |
| 115 | 123 | |
| 124 | test("the owner merges it and the next check says up to date", async () => { | |
| 116 | 125 | // 4. The owner merges it; the next check says up to date. |
| 117 | 126 | const merged = await mergePull(app, kid, repo, pull, "merge"); |
| 118 | 127 | expect(merged.ok).toBe(true); |
| @@ -122,7 +131,9 @@ describe("following across forges, end to end", () => { | ||
| 122 | 131 | expect(after?.taken).toBeUndefined(); |
| 123 | 132 | expect(upstreamWords(after, after!.checkedAt)).toContain("up to date"); |
| 124 | 133 | expect(takes()).toHaveLength(0); |
| 134 | }); | |
| 125 | 135 | |
| 136 | test("a conflicting parent commit opens one issue and no pull", async () => { | |
| 126 | 137 | // 5. A conflicting parent commit: one issue, no pull, main untouched. |
| 127 | 138 | const r = await commitToBranch(app, kid, repo, { message: "kid edits", files: [{ path: "a.txt", content: "kid's\n" }] }); |
| 128 | 139 | expect(r.ok).toBe(true); |
new above
offline