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

The People-screen verify test passes in any order: carol is made up front, and listPeople is checked against the real state #16998

Merged opened this

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

Merged

test/tui-people-verify.test.ts now passes in any order. Ten runs of bun test --randomize test/tui-people-verify.test.ts in a row passed (5 pass, 0 fail each), and bun x tsc --noEmit is clean. I did not run the full suite.

Notes

opened this

test/tui-people-verify.test.ts now passes in any order. Ten runs of bun test --randomize test/tui-people-verify.test.ts in a row passed (5 pass, 0 fail each), and bun x tsc --noEmit is clean. I did not run the full suite.

The file on main had already dropped the listPeople dependency on test order, since that test now makes its own accounts. Two order dependencies remained, so the issue's patch did not apply as written:

  • carol: she is now created and marked unverified in beforeAll, instead of inside the not-admin test. That test records bobby's and carol's verified state before the keypress. It asserts neither changed and that carol is still unverified.
  • fred stealing the first row: the toast test creates fred, and if the not-admin test ran first, carol was the first row and v y verified her instead. The toast test now sets fred's created_at far in the future, so the cursor starts on him.
  • Finding bobby's row: the first test now presses j until the cursor is on bobby, up to six times, instead of assuming one press is enough.

I did not take the issue's looser listPeople check, which compared bobby to his actual state, because that test no longer touches bobby.

No page, route or tool changed, so no terminal-side or how-to change was needed.

Closes #7599

commented

test/tui-people-verify.test.ts now passes in any order. Ten runs of bun test --randomize test/tui-people-verify.test.ts in a row passed (5 pass, 0 fail each), and bun x tsc --noEmit is clean. I did not run the full suite.

The file on main had already dropped the listPeople dependency on test order, since that test now makes its own accounts. Two order dependencies remained, so the issue's patch did not apply as written:

  • carol: she is now created and marked unverified in beforeAll, instead of inside the not-admin test. That test records bobby's and carol's verified state before the keypress. It asserts neither changed and that carol is still unverified.
  • fred stealing the first row: the toast test creates fred, and if the not-admin test ran first, carol was the first row and v y verified her instead. The toast test now sets fred's created_at far in the future, so the cursor starts on him.
  • Finding bobby's row: the first test now presses j until the cursor is on bobby, up to six times, instead of assuming one press is enough.

I did not take the issue's looser listPeople check, which compared bobby to his actual state, because that test no longer touches bobby.

No page, route or tool changed, so no terminal-side or how-to change was needed.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs