When I press "Subscribe" in the "Newsletter" dialog

Press a button or a link inside a dialog, a side panel or a notification, by its name, then wait until every component on the page has stopped moving: a button that closes the dialog has closed it (hidden), a button that opens another one has opened it.

Examples

When I press "Subscribe" in the "Newsletter" dialog
When I press "Accept" in the "Terms of use" dialog
When I press "Ok" in the "Delete the file report.pdf?" dialog
When I press "Check out" in the "Cart" side panel
When we press "Apply" in the "Filters" side panel

Pattern

When(/^(?:I |we )?press "([^"]*)" in the "([^"]*)" (dialog|side panel|notification)$/, …)

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