Skip to main content
Use Case

Cypress email testing without cy.wait().

Inboxical's Cypress SDK adds custom commands for inbox creation, message waiting, and OTP extraction. No polling loops, no flaky waits, no shared inboxes.

How it works

Three steps to email testing in Cypress.

1

Install the SDK

npm install @inboxical/cypress — registers custom commands automatically in your Cypress project.

2

Use custom commands

cy.createInbox() and cy.waitForMessage() integrate naturally with Cypress's chainable API.

3

Assert with confidence

Long-poll for messages, check subjects, extract OTPs — no cy.wait(5000) or retry hacks.

Complete email verification test

A real-world Cypress test using Inboxical custom commands.

cypress/e2e/registration.cy.ts
// cypress/e2e/registration.cy.ts
describe('Registration flow', () => {
it('sends welcome email with OTP', () => {
cy.createInbox().then((inbox) => {
// Register with the test inbox email
cy.visit('/register')
cy.get('[name=email]').type(inbox.emailAddress)
cy.get('[name=password]').type('TestPass123!')
cy.get('[type=submit]').click()
// Wait for email (long-polls, no cy.wait())
cy.waitForMessage(inbox.id).then((messages) => {
// Assert email content
expect(messages[0].subject).to.equal('Welcome to Acme!')
expect(messages[0].from).to.include('[email protected]')
// Extract and use OTP
const otp = messages[0].extracted_otp
expect(otp).to.have.length(6)
cy.get('[name=otp]').type(otp)
cy.get('[type=submit]').click()
cy.contains('h1', 'Dashboard').should('be.visible')
})
})
})
})

Why teams choose Inboxical for Cypress

Purpose-built for test automation — every feature designed for CI/CD.

Custom commands

cy.createInbox() and cy.waitForMessage() feel native to Cypress. No raw API calls in your tests.

Parallel-safe

Each test gets its own isolated inbox. Run in parallel with zero cross-test interference.

No cy.wait()

Long-polling means cy.waitForMessage() resolves when the email arrives. No arbitrary delays.

OTP extraction

Auto-extract 4-8 digit codes. Access via messages[0].extracted_otp — no regex needed.

CI/CD ready

Works in GitHub Actions, GitLab CI, CircleCI. Set CYPRESS_INBOXICAL_API_KEY and go.

Full email inspection

Check subject, from, to, body, HTML, headers, and attachments.

Start testing emails in Cypress today.

Try Inboxical with 50 emails/month on the free plan. Get the Cypress SDK from day one.