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

Persist osm login across playwright tests (temp login removed) #1910

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

spwoodcock
Copy link
Member

@spwoodcock spwoodcock commented Nov 22, 2024

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related

#1903 as the PR where this issue was discussed

Describe this PR

  • Didn't get a chance to finish this due to my flight, but hopefully you get the idea here @NSUWAL123
  • If I don't get to look at this until Monday, we could go over it together in person πŸ˜„
  • The context should probably be set just after the OSM login succeeds, then waiting for the redirect will allow the cookie to be set for the subsequent test.
  • The context wont save the cookie as it's httpOnly, but should save the OSM login part hopefully, to avoid having to do the Oauth flow for OSM again - let's see!
  • In the end the main goal is automated OSM login. To do that we need to make a test OSM account and can just hardcode the creds to this repo. If we optimise by reducing calls to OSM via the auth context, this is a bonus, but not essential for now.

Alternative Approaches Considered

  • Disable auth on the backend when DEBUG=true.
  • But this would mean we can't test properly with roles, and this could be important in future.

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Related to frontend code tests Related to automated code tests
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants