Skip to content

fix(system-tests): the member picker is given time to answer - #1154

Open
ExtraToast wants to merge 2 commits into
mainfrom
fix/committee-save-refusal
Open

fix(system-tests): the member picker is given time to answer#1154
ExtraToast wants to merge 2 commits into
mainfrom
fix/committee-save-refusal

Conversation

@ExtraToast

@ExtraToast ExtraToast commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What

CommitteeManagerPageSystemTest flakes. The option click in CommitteeFormHelper.addMember now carries an explicit 20s budget instead of Playwright's 5s default.

Why

Reproduced locally against a CI-image stack:

creates committee from manager() FAILED
  TimeoutError: Timeout 5000ms exceeded
  waiting for getByRole(AriaRole.OPTION, ...setName("Create197509 Member")).first()
  at CommitteeFormHelper.addMember(CommitteeFormHelper.kt:42)

UserSelect debounces typing for SETTLE_MS = 250 and then makes an API round trip. The default budget starts running before either has happened, so a loaded runner exhausts it.

Three forced re-runs of the class pass after the change.

What this does not cover

The CI symptom I first saw was a different test in the same class — updates committee name and description, where the submit click produced no browser request at all. That symptom has not been reproduced locally and may be a separate path through save(). Calling it out rather than claiming the class is now clean.

The UserSelect unit tests here are guards, not a fix: they pass on main, and pin that a chosen member's id survives a list that cannot yet account for it.


Diff breakdown added removed, scaled to the largest row.

frontend                                          +100     -1    3
  unit tests         █████████████████             +40     -0    1
  e2e tests          █████████████████████████░    +60     -1    2

system-tests                                       +34     -4    2
  system tests       ██████████████░░              +34     -4    2

──────────────────────────────────────────────────────────────────
production                                          +0     -0
tests                                             +134     -5
total (hand-written)                              +134     -5  5 files

CommitteeManagerPageSystemTest failed intermittently on the option click in
addMember, with `Timeout 5000ms exceeded` waiting for the option to appear.
UserSelect debounces typing for 250ms and then makes an API round trip, so the
option cannot be there when the default budget starts running, and a loaded
machine spends the rest of it. The click now carries a budget that covers the
settle, the round trip and a slow machine.

The UserSelect tests added alongside are guards rather than a fix: they pin
that a chosen member's id survives a list that cannot yet account for it. They
pass on main; the picker does not drop the id today, and these keep it that way.
`updates committee name and description` fails on CI with a submit that produced
no browser request at all, which means a rule on the form refused it rather than
the api. The failure could only say that nothing was sent. It now reads the
messages under the form's fields when the save fails to arrive, so the next run
names the field.

An end-to-end test covers the shape the refusal was expected to take: the
manager fetches its users after the form is open, and the picker holds a member
id it cannot yet name. Saving in that window reaches the api with the member
intact. It passes as written, so the refusal is something else — it stays as the
guard for the case that was ruled out.
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