Closed zmorris248 closed 4 months ago
Lines | Statements | Branches | Functions |
---|---|---|---|
72.78% (476/654) | 55.1% (81/147) | 66% (132/200) |
Tests | Skipped | Failures | Errors | Time |
---|---|---|---|---|
37 | 0 :zzz: | 0 :x: | 0 :fire: | 3.958s :stopwatch: |
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---|---|---|---|---|---|
All files | 72.78 | 55.1 | 66 | 71.71 | |
fixtures | 100 | 100 | 100 | 100 | |
kidneyStudyFixture.tsx | 100 | 100 | 100 | 100 | |
src/components | 90.99 | 44.44 | 89.65 | 91.17 | |
ErrorMessageBox.tsx | 100 | 100 | 100 | 100 | |
EventTimeline.tsx | 71.42 | 0 | 0 | 75 | 79–83 |
Metadata.tsx | 85.71 | 0 | 80 | 84.61 | 74–75 |
Navbar.tsx | 90.47 | 50 | 100 | 90 | 150, 163 |
StackedChart.tsx | 100 | 66.66 | 100 | 100 | 72–85 |
withAuthenticated.tsx | 100 | 100 | 100 | 100 | |
src/contexts | 90 | 100 | 58.33 | 89.28 | |
authContext.tsx | 90 | 100 | 58.33 | 89.28 | 72, 90, 104 |
src/data | 30.7 | 18.18 | 35.18 | 20 | |
index.ts | 30.7 | 18.18 | 35.18 | 20 | 17–27, 38–48, 56–66, 76–86, 98–107, 119–129, 139–148, 158–163, 175–198, 209–217, 227–232, 245–284, 293–303, 313–323, 328–338, 343–353, 369–370 |
src/hooks | 100 | 100 | 100 | 100 | |
useAuthContext.ts | 100 | 100 | 100 | 100 | |
src/pages | 81.72 | 67.27 | 80.39 | 82.01 | |
analytics.tsx | 96.15 | 100 | 88.88 | 96 | 90 |
dashboard.tsx | 100 | 100 | 100 | 100 | |
index.tsx | 100 | 100 | 100 | 100 | |
login.tsx | 83.87 | 88.88 | 85.71 | 83.33 | 52–57, 109 |
profile.tsx | 77.5 | 61.53 | 80 | 80.55 | 59–61, 83–86 |
signup.tsx | 71.62 | 55.55 | 66.66 | 71.23 | 89–91, 98–100, 116–140, 224–231, 270–287 |
src/pages/apikeys | 73.21 | 54.54 | 64.28 | 71.69 | |
index.tsx | 73.21 | 54.54 | 64.28 | 71.69 | 74–77, 89, 94–99, 104–108, 195 |
src/pages/studies | 75.23 | 47.22 | 67.74 | 78.12 | |
[id].tsx | 68.57 | 37.5 | 57.89 | 71.42 | 84, 93–107, 111–113, 124–125, 129, 133, 142, 218 |
index.tsx | 88.57 | 66.66 | 83.33 | 90.9 | 69, 78, 95 |
@zmorris248 @mbrzus I looked at the sonar cloud failure and want a second opinion on the severity of the risk found within. I don't think its a big deal for the scope of our project so maybe just leave a note that this is a potential problem
@Ivan-E-Johnson I added a slightly more specific regex and this seemed to fly with sonarcloud, so now it is good to go
Issues
6 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
8.0% Duplication on New Code
testing this right now
Overview
This pull request adds functionality to the job_monitoring_app so that users signing up must select a hospital they are associated with or a provider they are associated with depending on their role. Sign up will fail unless they choose an organization they are a part of. Also, email validation was added so that all emails must comply with a simple regex to verify it is a valid email address. Another small feature added is the display of the user's hospital or provider organization on their profile page.
Implementation
New routers on the backend were implemented so that calls can be made that fetch all hospitals and providers in the system and the hospital or provider associated with a given user.
Functions on the frontend were added to interact with the backend routers and grab the information through the APIs. A dropdown box was added on the signup page that displays the hospitals or providers in our system. Functions were also added to grab a users hospital/provider they are connected to and display this on their profile page.
Testing
Unit tests for all routers were created on the backend Unit tests for the signup page sad paths were made to ensure the validation mechanisms work Manually testing of all paths was done by me
Problems Faced
Notes