When I press Escape in the "Modal title" dialog

Press Escape with the keyboard focus in a dialog, a side panel or a drop-down menu (the step puts the focus there first when it is elsewhere, as a keyboard user's focus is), then wait for the component's answer: it closes (hidden), or it refuses (hidePrevented: a dialog whose keyboard option is off) and stops moving. Check what it did with "should be shown" or "should not be shown".

Examples

When I press Escape in the "Modal title" dialog
When I press Escape in the "Static backdrop" dialog
When I press Escape in the "Offcanvas" side panel
When I press Escape in the "Dropdown button" drop-down menu
When we press Escape in the "Manual close" dropdown menu

Pattern

When(/^(?:I |we )?press Escape in the "([^"]*)" (dialog|side panel|drop-?down menu)$/, …)

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