Repository navigation
Retry a swallowed submit click in the payment system tests - #79
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
InvoicePaymentsSystemTestfails intermittently on CI and blocks the deploy that follows a merge (twice onmainin the last fortnight). The server log of a failing run shows why: afterGET /invoices/:id/paymentcompletes, 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, thePATCHlands 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.