Update e2e tests for premium license#176
Conversation
Summary of ChangesHello @bears4barrett, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request transitions the end-to-end testing environment to a premium license configuration, which is crucial for developing and validating features related to multiple users and resource sharing. The core change involves introducing a new, test-specific API endpoint to simulate user logins, thereby replacing the previous anonymous user setup and streamlining the authentication process for e2e tests. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a test-only login endpoint to support e2e tests with a premium license, which no longer has an anonymous user. The changes are well-structured, with a new API route for test logins and updates to Playwright test helpers to use it. I've identified a potential race condition and a logic inconsistency in the new test login endpoint, along with a minor point for code cleanup. Overall, this is a good step towards improving the e2e test suite for premium features.
This reverts commit 989b73b.
This PR updates the e2e test environment to premium license. This is to support further e2e tests that relate to multiple users, resource sharing, as well as other premium features.
The most notable change from free license to premium is an initial "anonymous" user no longer exists. This PR handles the initial user with a new api/auth/test/login endpoint to simulate a new user login without the need to go through OIDC flow or third party OAuth. This new endpoint is for test purposes only and results in 404 unless the explicit ENABLE_TEST_LOGIN_ENDPOINT env var is set to true.
Playwright config has been updated to handle login, then initial setup (telemetry consent & data source), then run the tests. This improves the one time flows and removes the need to handle them in each subsequent test. It also improves the test run speed for not waiting on these steps reoccurring in every test.
In addition I have update playwright config to run the tests in parallel to speed up the test suite.