cypress-mailhog icon indicating copy to clipboard operation
cypress-mailhog copied to clipboard

Question - Does this also support keycloak based mailhog authentication?

Open rakeshnambiar opened this issue 1 year ago • 5 comments

First of all thanks for this utility. I am currently having challenges using this library as our Mailhog server authentication is via keycloak. Please could you confirm, that the library is capable of handling the keycloak-based authenticate as well internally?

rakeshnambiar avatar Sep 25 '23 10:09 rakeshnambiar

Hi, thanks for using this library. Currently third party auth is not supported. Are you currently using a centralized MailHog instance? That would lead to very unreliable tests by design since other test runs that could run in parallel would meddle with the state of your MailHog instance. Did you already think about utilizing the prebuilt mailhog docker container for your local dev environment and your CI workflows?

SMenigat avatar Sep 25 '23 11:09 SMenigat

Currently, we are using a centralized Mailhog instance. I will check with our development team about whether the prebuilt Mailhog instance config is easy to achieve or not.

rakeshnambiar avatar Sep 25 '23 11:09 rakeshnambiar

Hi, @SMenigat I am now using the basic authentication as you recommended and able to make a connection. I just wanted to ask you, is there any inbuilt method in the library for me to get a specific link in the email body which I wanted to click and continue in my test script?

rakeshnambiar avatar Oct 19 '23 15:10 rakeshnambiar

Looks like I need to get the whole body and format the body text the way I want. Pls let me know if there's any better way to do it.

rakeshnambiar avatar Oct 19 '23 15:10 rakeshnambiar

@SMenigat Pls ignore the previous question and I found a way to sort it out. I have now another question - it seems we cannot filter something like cy.mhHasMailTo AND mhGetMailsBySubject(subj). Instead of applying AND condition it is actually an OR

rakeshnambiar avatar Oct 20 '23 12:10 rakeshnambiar