How to automate email verification on E2E testing?

Hi all

I have turned on the email verification for Sign Up process.

Now, I would like to automate E2E testing with https://www.cypress.io/ on Sign Up process. The Problem that I encounter is the email verification part.

When I automate E2E testing for Sign Up process, how to confirm email verification programmatically with a help of fake smtp server, for example mailhog?

Thanks

Mailhog has an API you could use, https://github.com/mailhog/MailHog/tree/master/docs
You could also take a look at https://github.com/derbenoo/mailhog-awesome/blob/master/README.md

1 Like

Nice @zonaut thanks so much for your help. :+1: :+1: :+1:

Soft, which implementation did you use? https://github.com/Fredx87/cypress-keycloak-commands/
did you get yours working? besides placing some imports etc it only indicated 3 variables in the env file.

I have followed the steps to the best of my ability and cypress is returning request
{url: undefined/realms/undefined/protocol/openid-connect/logout} on a logout my env file is {
“env”: {
“auth_base_url”: “http://qa.insertdomainhere.io/auth/”,
“auth_realm”: “as in a working app”,
“auth_client_id”: “as in a working app”
}
} that’s all the directions indicate. any help would be appreciated!!

@JDTully I did not do it yet. I am still planning to do it. I will let you know, if I have a solution with cypress.

THanks

I have solved a few other things and now back to this!