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

Merged opened this

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

Merged

scout/forge:scout/7590-the-require-review-terminal-test-waits-o → main 1 commit fork

  • Merged. scout/7590-the-require-review-terminal-test-waits-o was merged into main as c660985.

Review

Sign in to review this change.
1 file changed +13 −9
test/tui-workflows.test.ts +13 −9
@@ -329,12 +329,14 @@ describe("reviews, threads and the merge gate", () => {
329329 await admin.until("Tweak the lamp");
330330 await admin.press("enter");
331331 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.
336338 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");
338340 expect(getPull(forge.db, repo.id, 1)?.mergedAt).toBeNull();
339341 } finally {
340342 admin.stop();
@@ -348,13 +350,15 @@ describe("reviews, threads and the merge gate", () => {
348350 await reviewer.press("R");
349351 await reviewer.until("Review #1");
350352 await reviewer.press("ctrl+d");
351 await reviewer.until("1 approval", 30_000);
353 await reviewer.settle();
354 expect(reviewer.text()).toContain("1 approval");
352355
353356 // The list wears the same verdict, in one tabular column.
354357 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("✓");
358362 } finally {
359363 reviewer.stop();
360364 }

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs