next auth cypress test
Hi I have been trying to write an integration test using the next auth test documentation (witch are out dated), can some one please share he’s working solutions? By the was this is the guide I tried to follow: https://next-auth.js.org/tutorials/testing-with-cypress
Testing with Cypress | NextAuth.js
To test an implementation of NextAuth.js, we encourage you to use Cypress.
9 Replies
Any updates on this? Looking to do this myself
Nop, I gave up on this… let me know if you manage to find a solution
Nothing solid yet but this seems promising https://github.com/microsoft/playwright/issues/21207
GitHub
[BUG] Unable to add cookie to browser context for testing app with ...
Context: Playwright Version: 1.31.1 Operating System: Linux Node.js version: v18.13.0 Browser: Chromium Extra: Using next auth Code Snippet playwright.config.ts import { defineConfig, devices } fro...
In my case, I cloud not target the input in google sign in and type test into it
Taking a look at this today and I realized that doing this is not a good idea:
did you guys find a good way to handle authentication?
Auth.js | Testing
Authentication for the Web
I just ended up using playwright
using the credentials method