Close a dialog, a side panel or a notification with its own close button (the × of its header first, else another button that dismisses it), or a drop-down menu with its button, and wait until it is closed and has stopped moving: hidden, its transition over, and for a dialog its backdrop gone. One that is already closed is left as it is.
Examples
When I close the "Modal title" dialog
When I close the "Offcanvas" side panel
When I close the "Sticky note" notification
When I close the "Dropdown button" drop-down menu
When we close the "Long content" dialog
Pattern
When(/^(?:I |we )?close the "([^"]*)" (dialog|side panel|drop-?down menu|notification)$/, …)
Part of @webship-js/bootstrap-steps (github.com/webship/bootstrap-steps), a step pack for Webship-js 2.0.x.