Giter VIP home page Giter VIP logo

cypress-email-example's Introduction

cypress-email-example

ci status badges status renovate-app badge cypress version cypress-email-example

Sending emails using nodemailer, receive the using smtp-tester and testing the received email using Cypress.

The HTML email test

See cypress/integration/spec.js

Read the blog post Testing HTML Emails using Cypress and watch this video where I explain the entire testing process.

Install and run

$ npm install
$ npm start
# from another terminal
$ npx cypress open
# click the spec.js

The application

The application shows the registration page pages/index.js where the user can fill the email and click the submit button. The page makes an Ajax request to the pages/api/register.js handler which sends an email. The email has the confirmation code the user is expected to enter on the confirmation page pages/confirm.js.

Email server

The emails are sent using nodemailer, see emailer.js. During tests the SMTP server is running inside cypress/plugins/index.js process.

Cypress tests

The tests run on GitHub Actions, see the .github/workflows/ci.yml workflow. The results are recorded on Cypress Dashboard.

cypress-email-example's People

Contributors

bahmutov avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cypress-email-example's Issues

npm i is impossible

path /Users/rudy/Desktop/cypress-email/node_modules/cypress
npm ERR! command failed
npm ERR! command sh -c node index.js --exec install
npm ERR! Cypress cannot write to the cache directory due to file permissions
npm ERR!
npm ERR! See discussion and possible solutions at
npm ERR! cypress-io/cypress#1281
npm ERR!
npm ERR! ----------
npm ERR!
npm ERR! Failed to access /var/root/Library/Caches/Cypress:
npm ERR!
npm ERR! EACCES: permission denied, mkdir '/var/root/Library/Caches/Cypress'
npm ERR!
npm ERR! ----------
npm ERR!
npm ERR! Platform: darwin-x64 (17.7.0)
npm ERR! Cypress Version: 9.5.1

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/badges.yml
.github/workflows/ci.yml
  • cypress-io/github-action v2
npm
package.json
  • next 12.3.4
  • cypress 9.7.0
  • cypress-recurse 1.35.3
  • nodemailer 6.9.13
  • smtp-tester 2.1.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.