Conversation
Fixed sleeps guessed how long a save/UI transition would take, adding dead time to every run regardless of actual latency. Swap "wait then hope it saved" for the existing waitForSave() network- response helper, and drop sleeps that were already redundant with the following expect()'s built-in polling. 63 calls / 149.8s of fixed sleep -> 30 calls / 57.3s across the suite; the remainder (Y.js websocket stabilization before typing, directory-listing eventual consistency) has no observable signal to poll on and is left as-is. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
waitForSave() watches for a client-side POST /source response, but ProseMirror document content persists to da-admin via da-collab's WebSocket/Yjs sync, not a direct browser request - the client never sees that response, so every swapped call timed out after 10s. Only sheet.spec.js's saves are genuine client-side POST /source calls (jspreadsheet), which is why that one kept passing. Revert the doc-save sites (edit/versions/copy_rename/preview_publish/ formatting/acl_browse) back to fixed sleeps; keep sheet.spec.js as-is. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
|
Local test run surfaced 10 failures — all Pushed a follow-up commit reverting the doc-save sites back to fixed sleeps; kept everything else (redundant pre-assert sleep removals, auth.setup.js, delete.spec.js modal-click fix, sheet.spec.js's pre-existing waitForSave usage). |
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.
Summary
waitForSave()helper (polls the actualPOST /sourceresponse instead of guessing a duration)expect()'s built-in polling (e.g. a 500ms wait immediately beforeexpect(locator).toBeVisible())Net: 63
waitForTimeoutcalls / 149.8s of fixed sleep -> 30 calls / 57.3s across the e2e suite.Test plan
npm run lintclean (done locally)waitForSave()🤖 Generated with Claude Code