Repository navigation
Turn import jobs on in the example site and click through the admin - #41
Merged
Merged
Conversation
The example left imports off, so the import panel had never run in a real admin. It now has a curators-only upload collection for source files, two seeded jobs over made-up files (one waiting, one that fails on purpose), and smoke checks that visitors and members can't read a source file, a job, run one or upload, and that running the waiting job gives the committed fixture's checksum. Uploaded files go in a throwaway folder that is deleted when the site stops; the site now waits for the server to exit before taking it away. Not yet clicked through in a browser: that follows in this branch. Co-Authored-By: Claude <noreply@anthropic.com>
The example site now has import jobs, so the import panel could run in a real admin for the first time. scripts/click-through.mjs does a curator's work on all four panels in a headless Chrome already on the machine, with a throwaway profile, and fails on any request off the site apart from Payload's code editor. It found three things jsdom can't see: - The panels' paragraphs and lists sat flush against each other, because the panel's margin reset outranked its spacing rule. The reset now carries no weight, and the script measures the gaps. - The form under a panel repeated it. The fields a panel already shows are now hidden in the form, not disabled, so they stay in its data: the import panel puts a run's result there so a later Save doesn't send the old one. - The made-up-data tag touched the source's title. The docs said every button asks first. Running an import never did, and they now say so. Tested: 633 unit tests, 74 smoke checks and the brand check locally; the click-through passes 40 of 40 on the built site. Six deliberate breaks each failed their own check. Not in CI: the click-through, which needs Chrome and the network. Not tested: a screen reader, Safari, Firefox, a phone, Postgres or SQLite. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Example site (
apps/payload-example)sourcesupload collection that only a curator can read, add to, change or delete, so nobody else can fetch a source file by its address.pnpm click-through: builds the site, opens a Chrome already on the machine with no window and a throwaway profile, signs in as the made-up curator and does a curator's work on all four panels. It installs nothing and fails on any request off the site apart from Payload's code editor.Payload plugin (unreleased), three things the click-through found in the real admin that jsdom can't see:
admin.hidden), still in its data, the API and the list's columns.Docs. They said every button asks first. Running an import never did, and they now say so.
Tested
next dev(58 before).Not tested
No new service, no cost, nothing published. Everything runs on this machine on made-up data.
🤖 Generated with Claude Code