Repository navigation
Site admin: e2e for the one dialog, plus optional nodeIds on content replace - #157
Merged
Merged
Conversation
SEO, Theme and Blocks/Editor save from the shell's action bar when their section renders inside haxcms-site-admin (falling back to the dialog's own Save otherwise), and the card helper also uses the section rail, since the dialog reopens on the section after a save. The Blocks test now toggles a block people can turn off: img is a required primitive whose checkbox is disabled, so toggling it changed nothing (the old always-on Save hid that). Refs haxtheweb/issues#3180. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PfFvVUkTpLX8DucJwVoaVk
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
replaceContent accepts nodeIds (array of page ids). A non-empty list rewrites only those pages; absent, empty or non-array keeps today's behavior exactly. Search is unchanged. Mirrored in haxcms-php with the same OpenAPI text. Used by the site admin Content section's page checkboxes. Refs haxtheweb/issues#3180. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PfFvVUkTpLX8DucJwVoaVk
The revisions dialog is now Page history inside the site admin dialog (haxtheweb/webcomponents#1031): a timeline of version rows and one Restore button for the version on screen. The UI check now asserts it renders in the dialog, opens on the current version with Restore off, and that choosing an older version shows its change with Restore on. The API checks are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PfFvVUkTpLX8DucJwVoaVk
The pre-commit formatter rewrote the whole file in the previous commit. Restore its existing formatting so the change is only the Page history UI check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PfFvVUkTpLX8DucJwVoaVk
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Refs haxtheweb/issues#3180 · Companion to haxtheweb/webcomponents#1031 · Stacked on #156
This PR changes the settings e2e tests and makes one small backend addition (below). The PHP mirror of the backend change is haxtheweb/haxcms-php#716. No build files change.
Backend: page list on replace
src/siteRoutes/v1/routes/siteSearch.js:replaceContentaccepts an optionalnodeIdsarray of page ids, used by the site admin Content section's page checkboxes.src/openapi/site-spec.yaml: documentsnodeIds, worded the same as the PHP spec.test/unit/site-search-route.test.cjs: 6 new tests. WhennodeIdsis left out, the response and commit are exactly the old ones; an empty list, a list of blanks, or a non-array value gives the same result as leaving it out.npm test: 2987 tests, 0 failures.What it touches
test/e2e/site-seo,site-theme,site-blocks-editor-settings(.e2e.test.cjs):clickDialogSaveclicks Save in the shell's action bar (.ftr button.save, waiting for it to enable) when the section renders insidehaxcms-site-admin. Otherwise it falls back to the dialog's ownbutton.actionSave.button.rail-item.label). After a save the dialog reopens on the section, so the launcher cards aren't there.site-blocks-editor-settings: the test toggledimg, which is a required block. Its checkbox is disabled and it can't be turned off. The old Save button was always enabled, so the test passed while saving nothing that changed. The new Save rightly stays off. The test now togglesvideo-player, or failing that the first block checkbox that isn't disabled.test/e2e/helpers/selectors.cjs: addsrailButton.Results
I ran these with webcomponents#1031 overlaid into the build:
Merge this together with webcomponents#1031.
Page history
revisions.e2e.test.cjsnow follows the redesigned revisions screen, Page history, which sits inside the site admin dialog (webcomponents#1031, Round 6). The UI check asserts four things:The API checks (list, detail, restore plus a new commit) are unchanged. 7/7 pass against that build, with 0 accessibility violations. The
revisions-dialogvisual baseline needs a refresh, since the screen is new. The pre-commit formatter rewrote the whole file in one commit; the next commit puts the file's own formatting back, so the net change is only the UI check.https://claude.ai/code/session_01PfFvVUkTpLX8DucJwVoaVk
Generated by Claude Code