Click on the page outside a dialog, a side panel or a drop-down menu: on the overlay when there is one, else on a part of the page that does nothing (never on a link, a button or a field). Then wait for the component's answer: it closes, or it stays (a dialog set not to close with a click outside), and it stops moving.
Examples
When I click outside the "Newsletter" dialog
When I click outside the "Upload in progress" dialog
When I click outside the "Cart" side panel
When I click outside the "Account" drop-down menu
When we click outside the "Delivery details" dropdown menu
Pattern
When(/^(?:I |we )?click outside the "([^"]*)" (dialog|side panel|drop-?down menu)$/, …)
Part of @webship-js/uikit-steps (github.com/webship/uikit-steps), a step pack for Webship-js 2.0.x.