Expand or collapse a panel: an item of an accordion, any block a toggle button shows and hides. The step clicks the title (or the button) the panel is named after when the panel is not already as wanted, then waits for shown / hidden and for its height transition or its animation to end. In an accordion that keeps one item open, expanding an item collapses the one that was open, and the step waits for that too.
Examples
When I expand the "Returns" panel
When I collapse the "Shipping" panel
When I expand the "More details" panel
When I expand the "Privacy" panel
When we collapse the "Payment" panel
Pattern
When(/^(?:I |we )?(expand|collapse) the "([^"]*)" panel$/, …)
Part of @webship-js/uikit-steps (github.com/webship/uikit-steps), a step pack for Webship-js 2.0.x.