• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / frontend / 8971758895
40%

Build:
DEFAULT BRANCH: master
Ran 06 May 2024 03:38PM UTC
Jobs 1
Files 556
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 May 2024 03:34PM UTC coverage: 32.144% (-0.08%) from 32.22%
8971758895

push

github

web-flow
Refactor Academy router (#2978)

* Reformat router config

Aligning the paths to the left and the elements to the right improves
code readability.

* Refactor homepage redirect to use loader

* Use new splat paths logic

To ease future migration.

* Create guarded route class

* Migrate Academy routes to data loader API

* Use Outlet in Academy container component
* Define Academy routes in separate file
* Replace some logic with loaders
* Use relative paths to match v7 splat paths behavior
* Use guarded route where possible
* Refactor dynamic routing logic for assessment configurations
* Update app router config when assessment configurations change

Also refactored "not found" behavior:

* Only show not found page in "/not_found" route
* Redirect all not found routes to "/not_found"

* Use lazy loading for Academy routes

* Update tests

* Fix tests

* Address comments

* Remove unnecessary `useEffect` dependency

* Refactor `ensureUserAndRole` to use route guard

* Remove now-unnecessary router dependency on role

In the future, the goal is to never have to update the application
router.

* Revert dependency injection for assessmentConfigurations

Now, the store is accessed directly inside the loader. This fixes an
infinite rerendering problem on admin panel.

* Remove outdated comment about disabled SA

* Fix format

* Restore old 404 behavior

---------

Co-authored-by: En Rong <53928333+chownces@users.noreply.github.com>

1921 of 6901 branches covered (27.84%)

Branch coverage included in aggregate %.

22 of 116 new or added lines in 20 files covered. (18.97%)

3 existing lines in 2 files now uncovered.

5004 of 14643 relevant lines covered (34.17%)

20.91 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
75.72
0.14% src/commons/assessment/Assessment.tsx
1
0.0
0.0% src/pages/academy/Academy.tsx
2
0.0
0.0% src/pages/academy/adminPanel/AdminPanel.tsx
2
0.0
0.0% src/pages/academy/dashboard/Dashboard.tsx
2
0.0
0.0% src/pages/academy/gameSimulator/GameSimulator.tsx
2
0.0
0.0% src/pages/academy/grading/Grading.tsx
2
0.0
0.0% src/pages/academy/groundControl/GroundControlContainer.ts
2
0.0
0.0% src/pages/academy/notiPreference/NotiPreference.tsx
2
0.0
0.0% src/pages/academy/sourcereel/Sourcereel.tsx
2
0.0
0.0% src/pages/academy/teamFormation/TeamFormation.tsx
2
0.0
0.0% src/pages/academy/teamFormation/subcomponents/TeamFormationForm.tsx
2
0.0
0.0% src/pages/academy/teamFormation/subcomponents/TeamFormationImport.tsx
2
0.0
0.0% src/pages/achievement/Achievement.tsx
2
0.0
0.0% src/pages/sourcecast/Sourcecast.tsx
3
0.0
0.0% src/commons/application/ApplicationWrapper.tsx
3
0.0
0.0% src/pages/academy/game/Game.tsx
5
44.68
3.38% src/routes/routerConfig.tsx
8
42.86
src/routes/routeGuard.ts
49
0.0
src/pages/academy/academyRoutes.tsx

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% src/pages/academy/Academy.tsx
2
0.0
0.0% src/commons/application/ApplicationWrapper.tsx
Jobs
ID Job ID Ran Files Coverage
1 8971758895.1 06 May 2024 03:38PM UTC 556
32.14
GitHub Action Run
Source Files on build 8971758895
  • Tree
  • List 556
  • Changed 26
  • Source Changed 0
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 998c65af on github
  • Prev Build on master (#8960018753)
  • Next Build on master (#8971907944)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc