MDL-39638 behat: New step to collapse nodes based on the expand nodes

Also updating steps with a collapse behaviour.