Skip to content

test: resolve potential flaky Playwright tests - #62688

Merged
susnux merged 1 commit into
masterfrom
chore/stableize-tests
Jul 30, 2026
Merged

test: resolve potential flaky Playwright tests#62688
susnux merged 1 commit into
masterfrom
chore/stableize-tests

Conversation

@susnux

@susnux susnux commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Another batch of making end-to-end tests less flaky.
When we migrated the tests we also converted some issues in Cypress tests to Playwright, so this solves:

  1. Use unified search status to ensure search state is ready
  2. wait for settled search before doing assertions
  3. share group between tests to reduce runtime

And also fixes some Playwright specific issues:

  • CI is slow when many actions run in parallel, so allow up to 1.5x the default timeout
  • Add timeouts where the default is "wait infinite"

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

- UnifiedSearchPage: expose the popover's polite status region and add
  waitForSettledResults(), which waits for the settled result count. That
  is the component's own "all providers answered" signal, so no arbitrary
  delay is needed. activeOptionId() asserts the attribute before reading
  it so a mid-flight list cannot yield null.
- header-unified-search: the three selection-dependent tests settle the
  search before reading the selection; Enter's navigation is awaited with
  a pre-armed waitForURL, since the /f/<id> redirect can outlive the
  default assertion timeout.
- admin-settings-limit-to-same-group: create the shared groups once in
  beforeAll instead of per test, moving two occ round-trips out of each
  test's timeout.
- FilesListPage: bound the previously unbounded waits, so a row or list
  that never renders fails fast and names the missing element instead of
  surfacing as a bare test timeout.
- playwright.config: allow 1.5x the default test timeout on CI, where the
  server is shared and every step is slower.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux requested a review from a team as a code owner July 30, 2026 11:03
@susnux
susnux requested review from kristian-zendato, nfebe and sorbaugh and removed request for a team July 30, 2026 11:03
@susnux susnux added 3. to review Waiting for reviews tests Related to tests AI assisted and removed AI assisted labels Jul 30, 2026
@susnux susnux added this to the Nextcloud 35 milestone Jul 30, 2026
@susnux
susnux requested review from kesselb and pringelmann July 30, 2026 11:05
@susnux
susnux merged commit 28a7502 into master Jul 30, 2026
287 of 291 checks passed
@susnux
susnux deleted the chore/stableize-tests branch July 30, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants