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) and some admin 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 is clicked. Waits for the navigation the submit causes.

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-core-steps (github.com/webship/drupal-core-steps), a step pack for Webship-js 2.0.x.