-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[OTHER] Playwright automated tests for authenticated pages #5788
Comments
It's great having you contribute to this projectWelcome to the community 🤓If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know. |
Hey! No issue is assigned to me right now. So, can I try to work on this issue? If that's okay |
Sure, thanks Vishrut 👍 |
Hey! Can someone collaborate with me on this issue as it is very large for me? @eddiejaoude |
@Vishrut19 you showed an interest in another issue, please only work on 1 issue at a time. I think it is best if I unassign this issue and you start with #5787. Also please read our contributing guidelines to keep things efficient https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md#working-on-an-issue-get-it-assigned-to-you |
Okay! I can understand as you have unassigned me from this issue. I will be working on issue #5787 |
As mentioned in issue #5787, please do not work directly on that issue, it is an |
@eddiejaoude asking a potentially silly question here. Why not use a GitHub login stored in dot env so as to not expose the credentials versus standing up a separate server to try to intercept calls for the one test like in the blog example? Is this less secure or is there another reason I'm missing? |
There are no silly questions Amanda. If we need to use anything private like a "real" login (which I hope we don't need to) then yep we should store it in the I am happy to bounce ideas on a call if easier, as I know this is a challenging ticket, just let me know in Discord. |
What would you like to share?
Playwright has an example of authenticated tests, to be able to test pages that require authentication
Here are the Playwright docs https://playwright.dev/docs/auth but we don't want to use a real username and password, we want to mock those out, this blog might help https://dev.to/kuroski/writing-integration-tests-for-nextjs-next-auth-prisma-using-playwright-and-msw-388m
Additional information
Plan B: We could during testing switch to credential login and create a fake user in the DB
The text was updated successfully, but these errors were encountered: