Skip to content

Fix the flaky admin user search scenario - #2

Merged
niranjankagri merged 1 commit into
mainfrom
fix/admin-search-stale-table
Oct 22, 2026
Merged

niranjankagri merged 1 commit into
mainfrom
fix/admin-search-stale-table

Conversation

@niranjankagri

Copy link
Copy Markdown
Owner

main failed after a README-only merge (run 39758065455): Search users by username and status listed all 28 users instead of only Admin.

Cause: the filters were typed while the System Users page was still loading its table; the page re-rendered, the username was lost, and Search ran without it. (The assertion's new diagnostic showed counter "(28) Records Found" with the full user list.)

Fix (page object only, scenario unchanged):

  • isDisplayed() also waits for the loader and the record counter.
  • filterByUsername() waits until the field holds the typed text.
  • search() waits until the old table is replaced or the counter changes.
  • The assertion message now includes the filter value, the counter and all usernames.

Local evidence: admin scenarios 8/8 and full suite 4/4 in a row against the public OrangeHRM demo.

🤖 Generated with Claude Code

The scenario "Search users by username and status" sometimes saw all 28
users instead of only Admin (main run 39758065455). The filters were
typed while the System Users page was still loading its table, and the
page then re-rendered and cleared the username; Search ran unfiltered.

- isDisplayed() now also waits for the loader and the record counter,
  so the filters are only typed into a fully loaded page.
- filterByUsername() waits until the field really holds the text.
- search() waits until the old table is replaced or the counter changes,
  so the assertion never reads the rows from before the search.
- The assertion message now shows the filter value, the counter and all
  usernames, so a future failure explains itself.

Locally: admin scenarios 8/8 and the full suite 4/4 in a row (one
earlier batch failed while the public demo site was unreachable).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@niranjankagri
niranjankagri merged commit 93578fd into main Oct 22, 2026
1 check passed
@niranjankagri
niranjankagri deleted the fix/admin-search-stale-table branch October 22, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant