DEV Community

Jon Perl
Jon Perl

Posted on

Test receiving an email in 2 minutes

QA Wolf provides a getInbox method that returns:

  • email: your team's email address
  • waitForMessage: function that waits for an email message to the test address

Let's use getInbox and waitForMessage in our test.

Below we 1) get an email address, 2) fill out the form, and 3) wait for a message and assert it's content.

const { context } = await launch();
const page = await context.newPage();
await page.goto("");
// use our test email to fill out the form
const { email, waitForMessage } = getInbox();
await page.fill("#verify_email", email);
// wait for a message and check it starts with "Congratulations"
const message = await waitForMessage();
Enter fullscreen mode Exit fullscreen mode

GitHub logo qawolf / qawolf

🐺 Create browser tests 10x faster

QA Wolf - Ship confidently

Set up browser tests in minutes to discover bugs before your users do

tweet slack

πŸš€ Start Testing | πŸ“– Documentation | πŸ—ΊοΈ Roadmap

🐺 What is QA Wolf?

QA Wolf helps you create, run, and debug end-to-end tests directly from the browser. We aspire to be the easiest way for developers to set up browser tests.

We found browser testing too difficult and often gave up on it entirely in our previous jobs. We built QA Wolf for people like us who want to ship confidently πŸš€ by creating browser tests easily.

πŸ€” Is QA Wolf a good fit for you?

🐺 Yes 🦌 No
βœ… You are a developer, or at least comfortable with code βœ–οΈ You are not comfortable with code
βœ… You want to get going quickly with an out of the box solution βœ–οΈ You need a lot of configuration options

Top comments (0)