Then the email with the subject "Reset password" to "user" should contain "This link and code will expire within 5 minutes."

The mail with a subject to an account or an address says a text (in its plain text or its HTML).

Examples

Then the email with the subject "Reset password" to "user" should contain "This link and code will expire within 5 minutes."
Then the email with the subject "Verify email" to "user" should contain "verify your email address"
Then the email with the subject "Reset password" to "user@example.com" should contain "Webship test sign-in"
And the email with the subject "Reset password" to "user" should contain "reset them"
Then the email with the subject "Reset password" to "editor" should contain "If this was you"

Pattern

Then(/^the email with the subject "([^"]*)" to "([^"]*)" should contain "([^"]*)"$/, …)

Part of @webship-js/keycloak-steps (github.com/webship/keycloak-steps), a step pack for Webship-js 2.0.x.