When I insert the selected media

Press the open Media Library dialog's "Insert selected" button, placing the ticked items into the field. The button is cloned into the jQuery UI dialog button pane, so the visible copy is the one pressed; both phrasings do the same thing.

Examples

When I insert the selected media
And we insert the selected media
When I submit the media library dialog
And I submit media library dialog
When we submit the media library dialog

Pattern

When(/^(I |we )*(?:insert the selected media|submit (?:the )?media library dialog)$/, …)

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