Skip to content
Snippets Groups Projects

Resolve #3456202 "Phpunit tests support"

1 unresolved thread

Closes #3456202

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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']");
  • added 1 commit

    Compare with previous version

  • 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.

    • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • Bryan Sharpe added 1 commit

    added 1 commit

    • 4826ba70 - Adds a test for submitting a form outside of the form tag using the form attribute.

    Compare with previous version

  • Sascha Eggenberger changed target branch from 11.0.x to 11.x

    changed target branch from 11.0.x to 11.x

  • Sascha Eggenberger changed target branch from 11.x to 11.0.x

    changed target branch from 11.x to 11.0.x

  • closed

  • Please register or sign in to reply
    Loading