Replace anchor_id=None with {block_type}-{position} in test seeds #125
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api!125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "123-test-seed-anchor-ids"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test seed helpers created Block objects with
anchor_id=Nonefor non-heading blocks, which no longer reflects production behavior where all blocks receive anchor_ids. This PR replaces all 5 occurrences with the{block_type}-{position}convention.Changes
tests/test_blocks_api.py: Updated 3 Block seed objects in_seed_note_with_blocks()and_seed_hierarchical_note()helpers --anchor_id=Nonereplaced with"paragraph-1","paragraph-3", and"paragraph-2"respectivelytests/test_compiled_page_api.py: Updated 2 Block seed objects in_seed_note_with_compiled_page()helper --anchor_id=Nonereplaced with"paragraph-1"and"paragraph-3"Test Plan
rg "anchor_id=None" tests/returns zero results for Block creationpytest tests/test_blocks_api.py tests/test_compiled_page_api.py -v)Review Checklist
Related
forgejo_admin/pal-e-docs#123-- the Forgejo issue this PR addressestodo-test-seed-anchor-ids-- the traceability note for this workTest seed Block objects used anchor_id=None for non-heading blocks, which misrepresents production behavior where all blocks get anchor_ids. Updated 5 occurrences across test_blocks_api.py and test_compiled_page_api.py to use the {block_type}-{position} convention. Closes #123 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>