uiowaSEP2024 / 002_ImagePro

Image processing backend
1 stars 0 forks source link

153 update sign up #165

Closed zmorris248 closed 4 months ago

zmorris248 commented 4 months ago

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

github-actions[bot] commented 4 months ago

Jest Coverage

Summary

Lines Statements Branches Functions
Coverage: 71%
72.78% (476/654) 55.1% (81/147) 66% (132/200)

Junit Summary

Tests Skipped Failures Errors Time
37 0 :zzz: 0 :x: 0 :fire: 3.958s :stopwatch:
Coverage Report (71%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files72.7855.16671.71 
fixtures100100100100 
   kidneyStudyFixture.tsx100100100100 
src/components90.9944.4489.6591.17 
   ErrorMessageBox.tsx100100100100 
   EventTimeline.tsx71.42007579–83
   Metadata.tsx85.7108084.6174–75
   Navbar.tsx90.475010090150, 163
   StackedChart.tsx10066.6610010072–85
   withAuthenticated.tsx100100100100 
src/contexts9010058.3389.28 
   authContext.tsx9010058.3389.2872, 90, 104
src/data30.718.1835.1820 
   index.ts30.718.1835.182017–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/hooks100100100100 
   useAuthContext.ts100100100100 
src/pages81.7267.2780.3982.01 
   analytics.tsx96.1510088.889690
   dashboard.tsx100100100100 
   index.tsx100100100100 
   login.tsx83.8788.8885.7183.3352–57, 109
   profile.tsx77.561.538080.5559–61, 83–86
   signup.tsx71.6255.5566.6671.2389–91, 98–100, 116–140, 224–231, 270–287
src/pages/apikeys73.2154.5464.2871.69 
   index.tsx73.2154.5464.2871.6974–77, 89, 94–99, 104–108, 195
src/pages/studies75.2347.2267.7478.12 
   [id].tsx68.5737.557.8971.4284, 93–107, 111–113, 124–125, 129, 133, 142, 218
   index.tsx88.5766.6683.3390.969, 78, 95
Ivan-E-Johnson commented 4 months ago

@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

zmorris248 commented 4 months ago

@Ivan-E-Johnson I added a slightly more specific regex and this seemed to fly with sonarcloud, so now it is good to go

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
6 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
8.0% Duplication on New Code

See analysis details on SonarCloud

powersaudrey25 commented 4 months ago

testing this right now