Close the open modal with its "Close" button (the cross at its top), as a person does, and wait for it to be gone.
Examples
When I close the open modal
When we close the open modal
And I close the open modal
Then I close the open modal
When I close the open modal
Pattern
When(/^(I |we )*close the open modal$/, …)
Part of @webship-js/filament-steps (github.com/webship/filament-steps), a step pack for Webship-js 2.0.x.