Contents

Find email

Scenario Outline:

  • Given emails are sent with "<delivery type>"
  • And a "Welcome" email sent to "first@example.com" containing:
    html
    <h1><a href="http://first-email/first-link">Welcome</a></h1>
    <p><a href="http://first-email/last-link">Confirm</a></p>
  • And a "Goodbye" email sent to "last@example.com" containing:
    html
    <h1><a href="http://last-email/first-link">Goodbye</a></h1>
    <p><a href="http://last-email/last-link">Confirm</a></p>
  • Then "<code>" should find "<matching email>" email

Examples:

delivery typecodematching email
htmlfind_emailGoodbye
htmlfind_email(subject: 'Welcome')Welcome
htmlfind_email(to: 'first@example.com')Welcome
htmlfind_email(subject: /welcome/i)Welcome
htmlfind_email(body: /welcome/i)Welcome
htmlfind_email(subject: 'welcome')
multipartfind_emailGoodbye
multipartfind_email(subject: 'Welcome')Welcome
multipartfind_email(to: 'first@example.com')Welcome
multipartfind_email(subject: /welcome/i)Welcome
multipartfind_email(body: /welcome/i)Welcome
multipartfind_email(subject: 'welcome')

Source: features/find_email.feature at commit c6ef46d9, Email Test Helpers (MIT license).