Skip to content

Retry a swallowed submit click in the payment system tests - #79

Merged
6temes merged 2 commits into
mainfrom
fix-payment-date-flake
Oct 6, 2026
Merged

6temes merged 2 commits into
mainfrom
fix-payment-date-flake

Conversation

@6temes

@6temes 6temes commented Oct 6, 2026

Copy link
Copy Markdown
Owner

InvoicePaymentsSystemTest fails intermittently on CI and blocks the deploy that follows a merge (twice on main in the last fortnight). The server log of a failing run shows why: after GET /invoices/:id/payment completes, no request arrives for the full 10 s wait — the click on the submit button never started a submit. In the passing test of the same run, the PATCH lands 90 ms after the page loads. The failure screenshot agrees: the button still reads "Confirm payment", not "Saving...".

The tests now submit through a helper that clicks the exact submit input inside the payment frame and, if it is still there two seconds later, clicks again. Turbo relabels the button the moment a submit starts, so a retry can only follow a click that sent nothing. Three swallowed clicks fail with a message that says so.

Not reproducible locally (20 straight passes before the change, 15 after), so this addresses the symptom the CI log proves rather than a root cause in the app.

No UI change.

6temes added 2 commits October 6, 2026 14:15
On CI the click on the payment form's submit button is occasionally lost:
the server log shows no request after the page loads, and the test times
out on the old page. Turbo relabels the button as soon as a submit starts,
so a label still present after two seconds means nothing was sent.
@6temes
6temes marked this pull request as ready for review October 6, 2026 05:18
@6temes
6temes merged commit f979f43 into main Oct 6, 2026
6 checks passed
@6temes
6temes deleted the fix-payment-date-flake branch October 6, 2026 05:18
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