-
Couldn't load subscription status.
- Fork 8.2k
Open
Labels
Description
Update Oct 22: As we are approaching the end of October, I'll accept the first PR that is ready to be merged. No need for an exclusive issue assignment. Note that AI generated content including code, PR description, or issue reply text may be marked as SPAM.
Prerequisite:
- Have Hackathon Starter up and running with a local account.
- Have set valid GitHub API keys and have linked their local account to their GitHub account in Hackathon Starter's account page.
Scope:
- Create
test/helpers/playwright-auth-setup.jsthat can capture a session for a Hackathon Starter user who already has GitHub linked, and output the session state so it can be set as an environment variable. The output ofnode test/helpers/playwright-auth-setup.jsshould include instructions on how to set the environment variable. - Create
test/e2e/github-authenticated.e2e.test.jsfor GitHub example page that use the session (via the environment variable) and Playwright to verify the portion of the page that require authentication. Note that these tests can't use mongo mongodb-memory-server and needs to use a persistence Mongo DB instance.
- The test should be able to run both for a local account that has GitHub linked, and an account that was created using GitHub without a local account. Please verify this manually. You would need to delete your Hackathon Starter accounts thru the accounts page. npx playwright test --config=test/playwright.config.js test/e2e/github-authenticated.e2e.test.jsshould run the new tests with all passing.- Update the readme