Close a dialog, a side panel, a drop-down menu or a popover: its own close button when it has one, else Escape; then wait until it is gone.
Examples
When I close the "Deactivate account" dialog
And I close the "Options" drop-down menu
When we close the "Solutions" popover
And I close the "Settings" side panel
When I close the "Payment successful" dialog
Pattern
When(/^(?:I |we )?close the "([^"]*)" (dialog|side panel|drop-?down menu|popover)$/, …)
Part of @webship-js/headless-ui-steps (github.com/webship/headless-ui-steps), a step pack for Webship-js 2.0.x.