Skip to content

Fix misc flaky tests - #9477

Merged
blizzz merged 4 commits into
mainfrom
fix/flaky-tests
Oct 27, 2026
Merged

blizzz merged 4 commits into
mainfrom
fix/flaky-tests

Conversation

@silverkszlo

Copy link
Copy Markdown
Collaborator

📝 Summary

Fixes flaky Playwright and Cypress tests. Two of the causes were real app bugs, not just test issues.

  • autosave: If an autosave retry failed (e.g. while offline), no new retry was scheduled, so autosave stopped until the user typed again. Caused the flaky autosave.spec.ts › "saves after being disconnected for 2 minutes".
  • user name label (a11y): The caret's user name label sat inside the document text, so a heading "Hello world" was read as "Hello wo alice rld". Caused the flaky conflict.spec.ts › "… after reopening the editor" when a stale session's caret landed inside the heading.
  • webdav's move: After saving, preview generation briefly locks the file, so the WebDAV MOVE in change-mime-type.spec.ts failed with a 500 LockedException. The response wasn't checked, so the test only failed later. It now checks for 201 and retries for up to 10 s.
  • @nextcloud/dialogs bump to 7.6.0.: In 7.5.0 the file picker could show the previous folder's files after navigating, because a stale request wasn't aborted. Caused the flaky Cypress attachments.spec.js › "Insert an image file from Files" and the follow-up "attachment files are in the attachment folder" failure.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

Signed-off-by: silver <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5.5
Preview generation after saving can briefly lock the file, so the WebDAV
MOVE fails with a 500 LockedException. The response was not checked, so
the test only failed later when opening the renamed file.

Check for 201 and retry for up to 10 seconds.

Signed-off-by: silver <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5.5
The caret label with the user name is rendered inline in the text, so
screen readers read it as part of the content, e.g. a heading "Hello
world" became "Hello wo alice rld".

Signed-off-by: silver <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5.5
When the pending autosave timer fired, pendingAutosave was not reset. If
that save failed (e.g. while offline), no new retry was scheduled and
autosave stopped until the user typed again.

Also log the retry delay in seconds instead of milliseconds.

Signed-off-by: silver <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5.5
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Oct 27, 2026
@blizzz
blizzz merged commit 08df407 into main Oct 27, 2026
65 checks passed
@blizzz
blizzz deleted the fix/flaky-tests branch October 27, 2026 16:37
@silverkszlo

Copy link
Copy Markdown
Collaborator Author

/backport to stable35

@silverkszlo

Copy link
Copy Markdown
Collaborator Author

/backport to stable34

@silverkszlo

Copy link
Copy Markdown
Collaborator Author

/backport to stable33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants