Automated tests for the git integration - #24
Merged
Merged
Conversation
Extend AppServer with the options git, gitRemote and pagesFolder, and test commits, pushes, shell escaping, generic errors and the editor's Message field. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ehe41umfi7BKegrSi4iuEB
… missing pages A failed save redirected to the page, so the form (title, text, git message) was lost although the code to show it again existed. Renaming or deleting a page which doesn't exist now fails early instead of logging PHP warnings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ehe41umfi7BKegrSi4iuEB
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ehe41umfi7BKegrSi4iuEB
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ehe41umfi7BKegrSi4iuEB
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.
Closes #15
Tests
AppServergets the optionsgit,gitRemote(local bareorigin) andpagesFolder(e.g. a path with spaces and quotes asPAGES_PATH); new base classGitTestCase.GitCommitTest,GitPushTest,GitPushWithoutRemoteTest,GitSpecialPathTest,GitDisabledTest,GitNoRepositoryTest: commits for page/image actions, literal storage of quotes,$(), backticks, newlines and non-ASCII text, pushes, generic errors without paths or commands (details in the error log), disabled commits, no repository, and the editor's "Message" field.Fixes found by the tests
Image deleted: a.gif (Updated images in the following pages: Gallery).Existing tests that expected a redirect after a failed save were adapted (
noteInResponse()).CLAUDE.mddocuments how to run the tests.Not changed: page rename/delete commit messages still contain HTML-escaped page names (e.g.
&).Full suite: 574 tests pass (47 skipped, mostly SVG without the optional library).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ehe41umfi7BKegrSi4iuEB
Generated by Claude Code