Repository navigation
test: pin form.clk and beforeSend extraData as Drupal and Backdrop use them - #647
Merged
Merged
Conversation
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.
Summary
Pins two behaviors that Drupal's and Backdrop's
misc/ajax.jsrely on, which no test covered. Test-only; no source change.form.clk, at its place, in a urlencoded bodyxhr-transport.test.jsFormDatauploadxhr-transport.test.jsextraDatakeys abeforeSendcallback adds, with thedataoption, as hidden fields of an iframe uploadiframe-transport.test.jsEvidence
Before: with the behavior removed in
src, the tests fail:form.clkfallback insubmitterOf: both XHR tests fail.beforeSenda deep copy of the settings: the iframe test fails.After: with
srcunchanged, all three pass on jQuery 1.7.2, 3.7.1 and 4.0.0 in Chromium, and in WebKit. They also pass unchanged on the 5.0 branch (feat!: jquery-form 5.0 #646) on jQuery 3.5.0, 3.7.1 and 4.0.0, so they carry over whenmainis merged into it.Found while running Backdrop 1.35.2 and Drupal 11.4.14 against 4.6.0 and
5.0.0-beta.1. Their image upload, "Add another item" and Views UI flows behaved the same as with their bundled 4.3.0 copies.Merge Danger
Door: two-way
Blast Radius: tests
🤖 Generated with Claude Code