etherpad-lite/src/tests
SamTV12345 118d48ca9e
test(enter): drop fragile viewport assertion (#7845)
The 'enter is always visible after event' test asserted that the last
line was within the browser viewport using boundingBox().y + height vs
window.innerHeight. Those values live in different coordinate spaces
(boundingBox is outer-page; window is per-frame), and the comparison
is fundamentally unable to model what the editor's auto-scroll actually
guarantees: visibility inside the ace_outer iframe, not within the
outer browser viewport.

Any plugin that adds chrome above or below the editor (toolbar rows,
sidebars, etc.) pushes the iframe's bottom below the browser viewport
while auto-scroll has correctly placed the cursor at the iframe's
bottom — failures look like 'Expected: > 731, Received: 720'. An
earlier attempt to switch to toBeInViewport({ratio: 1}) traded the
false positives for false negatives under chromium + plugins because
the inner iframe's contents can report ratio 0 against the outer
viewport even when the line is visible inside the editor.

Drop the visibility assertion entirely. The test's real value — that
Enter keystrokes produce new lines and the editor's input pipeline
keeps up — is exercised by the per-iteration toHaveCount value-wait
in the loop above. Visibility under plugin chrome is a separate,
plugin-aware concern.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:28:14 +02:00
..
backend fix(oidc): fix OIDCAdapter broken flows (#7837) 2026-05-25 16:39:21 +02:00
backend-new fix(a11y): add Dialog titles/descriptions and missing index.code key (#7836) 2026-05-25 10:43:10 +01:00
container test(docker): admin save persists across container restart (#7819) (#7821) 2026-05-19 17:17:12 +01:00
frontend fix: delay anchor line scrolling until layout settles (#7544) 2026-04-30 14:56:02 +08:00
frontend-new test(enter): drop fragile viewport assertion (#7845) 2026-05-25 17:28:14 +02: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