-
-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functionnal testing with auth #4527
Comments
Hey @Moumouuu! 👋🏻 Have you added the Also, you must use the |
Thank you for the quick response! Could you please clarify what you meant by 'added the authApiClient plugin to Japa and activated the memory driver for the session store'? As shown in my screenshot, I included the authApiClient in the plugins section of bootstrap.ts, and in .env.test, I configured 'SESSION_DRIVER=memory'. Additionally, I'm utilizing Session and Session Guard. I'm really following the documentation closely.. |
unfortunately i'm facing the exact same issue, following the doc guidelines for auth testing but cannot resolve it with ease. I already verified that before each test the SESSION_DRIVER is set to memory using env.get("SESSION_DRIVER"), added authApiClient in |
It seems that your reproduction is not updated. Could you please push your latest version @Moumouuu? Could you also try to change the loading order of the Japa plugins and put the |
I pushed my modifications and also added authApiClient at the end, but no changes occurred. On this branch : https://github.com/Avocado-Community/api.avocadogrowth/tree/11-dev-logout |
You are also missing the |
Thanks for the answer !
Since the two of us followed very carefully the docs, but did not found the right command or plugin to use, I may recommend to detail the two cases in the doc, separating specs required for auth testing with session and those for auth testing without session, it was very unclear for us that the authApiClient did not handle that itslef. Anyway, I think a complete minimum working example would greatly enhance the documentation for these particular cases. Thanks again ! |
Package version
6.2.2
Describe the bug
I'm trying to do some tests to find out if after a disconnection I have the correct response from the API.
I have everything setup as in the doc, updated the bootstrap file and the .env.test file with SESSION_DRIVER=memory
Only difference I have with the docs that in bootstrap.ts file i have authApiClient(app) and apiClient()
Reproduction repo
https://github.com/Avocado-Community/api.avocadogrowth
The text was updated successfully, but these errors were encountered: