Signing in Kinde Auth in Cypress Automated Testing

I'm trying to write an automated E2E Cypress test case that involves logging in to my website. In the Kinde Page that my website redirects to, the only way to sign in is via google auth. The main problem for me is that I honestly don't know how to tell Cypress to click on the "Continue with Google" button, and I would imagine I would face the same problem once I need to choose a google account to log in with. One of the alternative solutions I found is to authenticate via the Kinde Management API v1, but I don't understand how this works. Would love some help regarding this, thank you.
7 Replies
Oli - Kinde
Oli - Kinde11mo ago
Hey @GamesWerfer, Thanks for reaching out. Let me speak to my team and get back to you. Hi @GamesWerfer, I understand your use-case of wanting to implement e2e tests on the authencation flow. However, automating the Google sign-in process can be quite tricky due to Google's security measures. They don't allow automated scripts to interact with their login page. We also don't allow automated scripts on our hosted pages due to security measures. Is this blocking you from using Kinde?
GamesWerfer
GamesWerferOP11mo ago
In production it isn't. It's just that it's preventing me from signing in when I want to run E2E test scripts in the test runner. I can't write tests that uses the features of my project as I would always need to sign in first. But if that's not possible, if I used another automation tool like Selenium, am I probably going to face the same issues with cypress? @Oli - Kinde
Oli - Kinde
Oli - Kinde11mo ago
Hi @GamesWerfer, You would face the same issue with another testing automation tool like Selenium We test Kinde with e2e tests internally and continuously monitoring it with the synthetic workloads. Changes needed for e2e tests, with Kinde, to pass will likely compromise security.
GamesWerfer
GamesWerferOP11mo ago
Ah alright, thanks for the clarification! I do hope someday there will be an alternative way for automated testing and kinde
Yvens
Yvens10mo ago
Hello @Oli - Kinde , does that mean that it is not possible to e2e test pages that are behind authentication walls ?
Oli - Kinde
Oli - Kinde9mo ago
Hey @Yvens, Let me get back to you on this. I know Andre replied to you with a suggested approach to e2e testing here: https://discord.com/channels/1070212618549219328/1209447882923581461/1211551305563250728
Yvens
Yvens9mo ago
@Oli - Kinde Yes thank you guys
Want results from more Discord servers?
Add your server