mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-22 09:36:53 +00:00
* fix: list bugs — indent export, renumber performance, and batching Addresses four list-related bugs: #4426: Indented text exports as bulleted lists. Added list-style-type:none to indent-type <ul> elements in ExportHtml.ts so exported indented content doesn't show bullet markers. #3504 / #5546: List operations (indent, outdent, toggle) on large lists are O(n²) because renumberList() runs after each individual line change. Added _skipRenumber batching flag to setLineListType() — bulk operations in doInsertList() and doIndentOutdent() now set all line types first, then renumber once at the end. #6471: Ordered list numbering in exports — the start attribute is already read from the pad's atext during export. The client-side renumberList() correctly sets start attributes which are persisted. Added export test to verify numbering is preserved across bullet interruptions. Fixes #4426, #3504, #5546 Related: #6471 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: address Qodo review — exception safety, batch removal, renumber scope - Wrap _skipRenumber in try/finally to prevent permanent disabling on error - Move list removal (togglingOff) into the batched mods array instead of calling setLineListType directly (fixes O(n²) for list removal) - Use firstLine instead of mods[0][0] for renumbering since the first mod may be an indent/removal that renumberList skips - Rewrite indent export test to actually create indent lines via setHTML and unconditionally assert list-style-type:none is present Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: rewrite export tests to use importHtml/exportHtml directly The HTTP API approach (setHTML via supertest) was hanging when tests ran standalone because the API endpoint waited for something in the request pipeline. Using importHtml.setPadHTML and exportHtml.getPadHTML directly is faster and more reliable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update importexport test to expect list-style-type on indent ul The indent export fix adds style="list-style-type: none;" to indent <ul> elements, which broke the golden test string comparison. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| backend | ||
| backend-new | ||
| container | ||
| frontend | ||
| frontend-new | ||
| ratelimit | ||
| README.md | ||
| settings.json | ||
About this folder: Tests
Before running the tests, start an Etherpad instance on your machine.
Frontend
To run the frontend tests, point your browser to <yourdomainhere>/tests/frontend
Backend
To run the backend tests, run cd src and then npm test