Expand or collapse a collapsible fieldset of a form, by its legend ("Formatting options", "Visibility conditions"). A fieldset that is already in the wanted state is left alone.
Examples
When I expand the "Formatting options" fieldset
When I collapse the "Formatting options" fieldset
When we expand the "Visibility conditions" fieldset
And I expand the "Style settings" fieldset
When collapse the "Admin label" fieldset
Pattern
When(/^(I |we )*(expand|collapse) the "([^"]*)" fieldset$/, …)
Part of @webship-js/backdrop-cms-steps (github.com/webship/backdrop-cms-steps), a step pack for Webship-js 2.0.x.