Resolve #3456202 "Phpunit tests support"
1 unresolved thread
Closes #3456202
Merge request reports
Activity
added 1 commit
- 7085a0d9 - Update submitForm() to allow for form actions outside of form
75 75 $action = $form->getAttribute('action'); 76 76 } 77 77 else { 78 $submit_button = $assert_session->buttonExists($submit); 78 $submit_button = $assert_session->elementExists('xpath', "//form //input[@value='$submit']"); changed this line in version 2 of the diff
67 67 */ 68 68 protected function submitForm(array $edit, $submit, $form_html_id = NULL) { 69 69 $assert_session = $this->assertSession(); 70 $submit_button = $assert_session->buttonExists($submit); 70 71 72 // Check if button has a form attribute set. 73 if ($form_id = $submit_button->getAttribute('form')) { Adds a check for form action buttons which have a
form
attribute set (and therefore might be outside of the actual<form>
element.See https://www.w3schools.com/tags/att_form.asp
Gin's new sticky action button feature moves the form actions outside of the form and places them in another region (sticky header). This is a similar effort we'd like to do in Core with the new navigation and it's the Top bar integration.
The additional check looks for any
form
attribute being set on the form action and uses that form instead.
added 1 commit
- 4826ba70 - Adds a test for submitting a form outside of the form tag using the form attribute.
Please register or sign in to reply