Public: anyone can read this; the crew can change it.
The require-review terminal test waits on the pull's loaded gate, not a 30 s screen poll, and passes 20 runs in a row beside the full suite #7600
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/7590-the-require-review-terminal-test-waits-o → main 1 commit fork
1 file
changed +13
−9
test/tui-workflows.test.ts +13 −9
| @@ -329,12 +329,14 @@ describe("reviews, threads and the merge gate", () => { | ||
| 329 | 329 | await admin.until("Tweak the lamp"); |
| 330 | 330 | await admin.press("enter"); |
| 331 | 331 | await admin.until("#1"); |
| 332 | // The box says what is missing, and `m` says it out loud. | |
| 333 | // Wait for the gate's own line, not the word "review" (the footer | |
| 334 | // wears it from the first paint, before the setting has loaded). | |
| 335 | await admin.until("Needs an approval of this head", 30_000); | |
| 332 | // The footer wears "review" from the first paint, before the setting | |
| 333 | // has loaded; settle() waits for the pull's own load, so the gate's | |
| 334 | // line is read once, not polled for. | |
| 335 | await admin.settle(); | |
| 336 | expect(admin.text()).toContain("Needs an approval of this head"); | |
| 337 | // `m` while it is unread is a no-op, never a merge; loaded, it speaks. | |
| 336 | 338 | await admin.press("m"); |
| 337 | await admin.until("needs an approval of its current head first", 30_000); | |
| 339 | expect(admin.text()).toContain("needs an approval of its current head first"); | |
| 338 | 340 | expect(getPull(forge.db, repo.id, 1)?.mergedAt).toBeNull(); |
| 339 | 341 | } finally { |
| 340 | 342 | admin.stop(); |
| @@ -348,13 +350,15 @@ describe("reviews, threads and the merge gate", () => { | ||
| 348 | 350 | await reviewer.press("R"); |
| 349 | 351 | await reviewer.until("Review #1"); |
| 350 | 352 | await reviewer.press("ctrl+d"); |
| 351 | await reviewer.until("1 approval", 30_000); | |
| 353 | await reviewer.settle(); | |
| 354 | expect(reviewer.text()).toContain("1 approval"); | |
| 352 | 355 | |
| 353 | 356 | // The list wears the same verdict, in one tabular column. |
| 354 | 357 | await reviewer.press("q"); |
| 355 | // The title paints before the verdict column loads: wait for it. | |
| 356 | await reviewer.until("Tweak the lamp", 30_000); | |
| 357 | await reviewer.until("✓", 30_000); | |
| 358 | // The title paints before the verdict column loads: settle waits for it. | |
| 359 | await reviewer.settle(); | |
| 360 | expect(reviewer.text()).toContain("Tweak the lamp"); | |
| 361 | expect(reviewer.text()).toContain("✓"); | |
| 358 | 362 | } finally { |
| 359 | 363 | reviewer.stop(); |
| 360 | 364 | } |
new above
offline