etherpad-lite/src/tests
John McLear d036cf0e70
fix(test): null padDeletionToken before pad init to stop modal focus theft (#7643)
PR #7546 added a one-time pad-deletion-token modal that opens via the
clientVars handshake on creator sessions and synchronously focuses its
input through setTimeout(0). `goToNewPad`'s previous mitigation hid the
modal element after `waitForEditorReady`, but the editor iframe
attaches before clientVars arrives, so the hide runs against a still-
hidden modal, short-circuits, and the modal opens later mid-test —
stealing focus and dropping the next Enter / Tab. Visible on develop
in `enter.spec.ts:33` and `indentation.spec.ts:9` across all four
Playwright jobs (run 25214868650).

Intercept `clientVars` assignment via `page.addInitScript` and null out
`padDeletionToken` before `pad.ts`'s `showDeletionTokenModalIfPresent`
can read it, so the modal-show short-circuits at the source. The
deletion-token spec navigates inline with `page.goto` and does not
call this helper, so its modal still appears.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 14:24:23 +01:00
..
backend feat(api): public compactPad API + bin/compactPad CLI over existing Cleanup (#7567) 2026-05-01 14:23:54 +01:00
backend-new feat(updater): tier 1 — notify admin and pad users of available updates (#7601) 2026-05-01 20:02:12 +08:00
container Feat/oauth2 (#6281): Added oauth to API paths 2024-03-26 17:11:24 +01:00
frontend fix: delay anchor line scrolling until layout settles (#7544) 2026-04-30 14:56:02 +08:00
frontend-new fix(test): null padDeletionToken before pad init to stop modal focus theft (#7643) 2026-05-01 14:24:23 +01:00
ratelimit chore: updated clients to esm (#7627) 2026-04-28 21:46:49 +02:00
README.md restructure: move bin/ and tests/ to src/ 2021-02-04 17:15:08 -05:00
settings.json Add creator-owned pad settings defaults (#7545) 2026-04-19 11:13:44 +01:00

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