Skip to content
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

📚 playwright config for auth tests #22

Merged
merged 15 commits into from
Aug 4, 2023
Merged

Conversation

shon-button
Copy link
Collaborator

@shon-button shon-button commented Jul 17, 2023

Addresses #21

🔒 Configure: Set up Playwright authentication with mock next-auth JWT*

📝 Purpose:
To establish an authenticated browser state, configure Playwright to simulate the presence of a next-auth JWT token. This token, representing next-auth.session-token, will be used to prepare authentication credentials for subsequent tests.

🛠️ Process:

  • Integrate Playwright with mock JWT for authentication simulation
  • Implement context setup for next-auth.session-token to create authenticated browser state

🚀 Impact:
This configuration ensures a consistent and reliable environment for testing authentication-related scenarios. It paves the way for seamless utilization of authentication credentials in upcoming tests, promoting comprehensive and effective testing.

…TIALS required for Google Client Libraries. You will need to set .env.development\GAC_EXPORT value to the value of the service account key location (https://console.cloud.google.com/iam-admin/serviceaccounts/details/106707473171516793046?project=emissions-elt-demo)
.env Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to fix the .gitignore to hide this file?

@YaokunLin YaokunLin self-requested a review July 18, 2023 20:50
shon-button and others added 8 commits July 21, 2023 11:20
🆕 storing service-account-key.json as a string in scripts\tests\.env
🆕 created scripts/tests/test-gcs.sh to set the export GOOGLE_APPLICATION_CREDENTIALS from the .env value for the Playwright GCS tests
🔧 changed package.json\scripts\dev: scripts/tests/test-gcs.sh
📚 Updated READ.ME with scripts/tests/test-gcs.sh dependancy steps
@shon-button shon-button reopened this Jul 31, 2023
@shon-button shon-button merged commit 4d110a2 into develop Aug 4, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants