This repository demonstrates how to build and test email workflows—like signup verification and forgot password—using a Vue 3 frontend, Express backend, and Playwright tests with a mocked mail server powered by Mokapi.
- Vue 3 signup and forgot password forms
- Express backend sending emails via Mokapi SMTP
- Mokapi mock mail server captures and exposes emails via API
- Playwright tests trigger workflows and verify emails automatically
- Node.js
- Mokapi
Before running anything, install npm dependencies in the project root:
npm installFrom project root, run:
mokapi mocks/mail.yamlThis starts Mokapi’s SMTP and mock mail API.
In a new terminal:
node backend/index.jsThe backend will send emails to Mokapi SMTP server.
In another terminal, run:
npx playwright testPlaywright will launch the Vue 3 frontend app, run end-to-end tests by submitting forms, and verify emails using Mokapi’s REST API.
/backend # Express backend code
/mocks/mail.yaml # Mokapi mock mail server configuration
/tests # Playwright test scripts
/frontend # Vue 3 frontend app
README.mdMIT License