When I submit by id "edit-submit"

Submit a form by the id of its submit button, dispatching the click inside the page. Core suffixes a repeated id (edit-submit--2), a search block in the header has an edit-submit of its own, and some administration themes clone the primary button into a sticky bar that covers the original. So every element whose id, data-drupal-selector or name matches is a candidate, and the visible one in the main region of the page is clicked. Waits for the navigation the submit causes; when the browser refuses the submit because a required field is empty, the step returns at once.

Examples

When I submit by id "edit-submit"
And I submit the form by id "edit-submit"
When we submit by the id "edit-preview"
And I submit the form by the id "edit-delete"
When I submit by id "edit-clear"

Pattern

When(/^(I |we )*submit (?:the form )?by (?:the )?id "([^"]*)"$/, …)

Part of @webship-js/drupal-cms-steps (github.com/webship/drupal-cms-steps), a step pack for Webship-js 2.0.x.