-
Notifications
You must be signed in to change notification settings - Fork 887
chore(site): Add unit tests, mocks #514
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #514 +/- ##
==========================================
- Coverage 60.35% 60.22% -0.14%
==========================================
Files 191 193 +2
Lines 10864 10875 +11
Branches 85 83 -2
==========================================
- Hits 6557 6549 -8
- Misses 3587 3603 +16
- Partials 720 723 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me, thanks for fixing the login page labels and improving the test setup. The questions I had were mostly related to the semantics in the mock rest responses, otherwise ✔️
site/src/Main.tsx
Outdated
<Router> | ||
<App /> | ||
</Router>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud (non-blocking): Something that we lose/was nice in the prior implementation is a single entrypoint into the React application <App>
. I think this PR is a step in the right direction and an improvement, so I don't think we need to optimize for this now, but I'd expect to see one component here eventually. I think a related problem is that we don't keep App
thin right now, and can probably extract out the providers like in v1.
We can think on this later; I'm getting the thoughts out there, but don't want to block!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think the better way to do what I was trying to do is to split App into two components, one that has the router and providers, and one that has the routes. That way we could test the routes one with a test setup and keep Main simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just did that, what do you think? let me know if there's a better name!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there's more work to do in the API mocks, but everything is looking good and those will be continually evolving as we go.
Great stuff!
This addresses part of #485.
utils
so we can reuse them elsewhere if needed.