You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f41bda5
Browse filesBrowse the repository at this point in the historyBrowse files
User
committed
Fix flaky test_form_sync_events by retrying the empty-form submit
`test_form_sync_events` intermittently times out waiting for
`#error[data-value='true']` after submitting the empty form. The
`DjangoForm` client component registers a native `submit` listener that
calls `preventDefault()` and forwards the form data over the WebSocket,
but the listener is attached in `componentDidMount` and can momentarily
lag the rendered `<form>` under load. A click landing during that window
performs a native form submission: the browser reloads the page (a second
`Starting client...` with no preceding `Disconnected!`, matching the CI
signature), which resets all ReactPy state so `on_error` never fires.
The existing retry guard only covered the later *filled* re-submit. Extend
it into a shared `_retry_submit_until(selector, fill=...)` helper and use
it for the empty-submit path too (and, symmetrically, for the async-event
form which shares the same interaction). Re-clicking the submit until the
awaited callback surfaces makes the interaction deterministic instead of
racing the mount. Test-only change; no product code is touched.
0 commit comments