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

[Modern UI] Refactor and Add Tests for Entrypoints #2613

Merged
merged 7 commits into from
Feb 26, 2024

Conversation

andrewbaldwin44
Copy link
Collaborator

@andrewbaldwin44 andrewbaldwin44 commented Feb 26, 2024

Proposal

We shouldn't change code to fit the tests, however we should write code in such a way that it is easily testable. After some thought, I concluded that the 'App' file wasn't really rendering the App, but rather a piece of the App. Additionally the 'index' file was doing a lot more than is should be doing, and in this way some important app logic could not be tested.

This PR:

  • Moves the logic that was previously defined in the 'index' entrypoint to the 'App' file
  • Defines a new folder 'pages', which describes the 3 different parts of the frontend that we have; Dashboard Page, Auth Page, and the HTML Report
  • Adds tests for the App and for all three pages
  • Adds a test for the FallbackRender

I also ensured in the backend that we have test coverage for:

  • Receiving the Dashboard when expected
  • Receiving the Auth page when expected
  • Receiving the HTML Report when expected

@cyberw
Copy link
Collaborator

cyberw commented Feb 26, 2024

Sounds reasonable to me.

I suspect the changing of logo.png back to lower resolution is accidental though?

@cyberw cyberw merged commit 355d2e8 into locustio:master Feb 26, 2024
15 checks passed
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.

None yet

2 participants