Skip to content

Wait for typed value in progress preview spec - #26111

Merged
myabc merged 1 commit into
devfrom
fix/progress-preview-spec-race
Oct 16, 2026
Merged

myabc merged 1 commit into
devfrom
fix/progress-preview-spec-race

Conversation

@myabc

@myabc myabc commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Ticket

None. Flaky failure seen on WebKit: https://github.com/opf/openproject/actions/runs/38923713176/job/117049852772

Relates to #25168

What are you trying to accomplish?

Fixes a race in the progress preview controller spec "sends the touched fields with the preview request".

What approach did you choose and why?

userEvent.clear fires an input event that schedules the 100 ms debounced preview. When typing starts later than that, as on slow WebKit runners, a preview with an empty value sets the frame src first, and the spec read its params before the typed value arrived (expected '' to be '12').

The value assertion now sits inside waitFor, so the spec waits for the preview request carrying the typed value. Forcing a 150 ms gap between clear and type reproduces the CI failure with the old spec; the new spec passes.

AI involvement

Collaborative – AI generated a substantial part of the code; I reviewed and understand every line.

Merge checklist

  • Added/updated tests

Clearing the input fires an input event that schedules the 100ms
debounced preview. When typing starts later than that, as on slow
WebKit CI runners, a preview with an empty value sets the frame src
first and the spec reads its params before the typed value arrives.

Moves the value assertion into waitFor so the spec waits for the
preview request carrying the typed value.
@myabc
myabc requested review from crohr and oliverguenther October 16, 2026 15:44
@github-actions github-actions Bot added the ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. label Oct 16, 2026
@myabc
myabc marked this pull request as ready for review October 16, 2026 15:44
@github-actions

Copy link
Copy Markdown

Warning

This pull request does not link an OpenProject work package.

Please add a link to the work package in the description, or reference it in the
title in square brackets, e.g. [SLUG-123] My title here.

@myabc myabc added flaky-spec Addresses a Flaky Spec javascript Pull requests that update Javascript code needs review labels Oct 16, 2026

@oliverguenther oliverguenther left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into it @myabc 🙇

@myabc
myabc merged commit e7ec68b into dev Oct 16, 2026
28 of 29 checks passed
@myabc
myabc deleted the fix/progress-preview-spec-race branch October 16, 2026 16:56
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. flaky-spec Addresses a Flaky Spec javascript Pull requests that update Javascript code needs review

Development

Successfully merging this pull request may close these issues.

2 participants