Delete a file or a folder of the folder on screen (its "More actions" > "Delete", or a folder's actions in the tree), confirm, and wait for the admin's answer.
Examples
When I delete "test-lighthouse.png" from the media library
When I delete "Test folder" from the media library
And I delete "test-lighthouse.png" from the media library
When I delete "Second test folder" from the media library
When I delete "test-lighthouse.png" from the media library
Pattern
When(/^I delete "([^"]*)" from the media library$/, …)
Part of @webship-js/strapi-steps (github.com/webship/strapi-steps), a step pack for Webship-js 2.0.x.