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

forge.json's app.looks names the five pages the owner opens most, and a test proves each answers 200 #2805

Closed opened this
Closed without merging

forge.json now has app.looks set to / /board /map /apps /settings, and a new test checks that each of those pages answers 200 to an admin. Test: test/forge-looks.test.ts reads forge.json, checks the list is exactly those five paths, then requests each one as a seeded admin on a fresh forge.

Notes

stopped closed without shipping deploy b60170c

opened this

forge.json now has app.looks set to / /board /map /apps /settings, and a new test checks that each of those pages answers 200 to an admin.

  • Test: test/forge-looks.test.ts reads forge.json, checks the list is exactly those five paths, then requests each one as a seeded admin on a fresh forge. Redirects are not followed, so a redirect counts as a failure. The new test passes locally (6 pass). I did not run the type check or any other suites; the forge's check runs them on this push.
  • Preview: The preview's looks showing the five pages is not confirmed. The push went through, and the third checkbox depends on the preview that push triggers.
  • Left out: No other pages, and nothing about what the looks show. That is #2783's job.

To try it, run bun test test/forge-looks.test.ts.

Closes #2801

2 earlier comments
commented

forge.json now has app.looks set to / /board /map /apps /settings, and a new test checks that each of those pages answers 200 to an admin.

  • Test: test/forge-looks.test.ts reads forge.json, checks the list is exactly those five paths, then requests each one as a seeded admin on a fresh forge. Redirects are not followed, so a redirect counts as a failure. The new test passes locally (6 pass). I did not run the type check or any other suites; the forge's check runs them on this push.
  • Preview: The preview's looks showing the five pages is not confirmed. The push went through, and the third checkbox depends on the preview that push triggers.
  • Left out: No other pages, and nothing about what the looks show. That is #2783's job.

To try it, run bun test test/forge-looks.test.ts.

commented

This pull now changes nothing against main, because #2783 already did this work there. I merged main and pushed.

  • Conflict: Both sides added test/forge-looks.test.ts and set app.looks in forge.json. main's version lists 20 pages and has a stronger test: the list must equal the router's top-level pages minus a documented not-a-page list, and each listed path must answer 200 to an admin. This branch's five-page list and test could not both hold with it.
  • Resolution: I took main's forge.json and test/forge-looks.test.ts in full and dropped my five-page versions. That leaves my five paths covered by main's list, which includes all of them, and by main's 200 check.
  • Tests: bun test test/forge-looks.test.ts passes (3 tests). I ran nothing else; the forge's check covers the rest on this push.
  • Close the pull: #2801's goals are met on main through #2783. A person can close this pull and the issue. I did not decline it, since the branch carries a merge commit.
commented

Declined: already done on main in 74363e0c. #2785 (main's commit 74363e0c) set app.looks in forge.json to every top-level page, including / /board /map /apps /settings. It also added test/forge-looks.test.ts, which checks that each listed path answers 200 to an admin. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m5ajay2jjx3jmnw9ge7e70yg

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs