Assert that the site sent an email with a subject (or a part of it) to an account of the registry (by its handle) or an address, since the scenario began.
Examples
Then an email with the subject "Password reset" should have been sent to "editor"
Then an email with the subject "has invited you to join the team" should have been sent to "webship-test-invite@example.com"
And an email with the subject "Password reset" should have been sent to "viewer"
Then an email with the subject "Design team" should have been sent to "webship-test-join@example.com"
Then an email with the subject "Password reset" should have been sent to "editor@example.com"
Pattern
Then(/^an email with the subject "([^"]*)" should have been sent to "([^"]*)"$/, …)
Part of @webship-js/penpot-steps (github.com/webship/penpot-steps), a step pack for Webship-js 2.0.x.