Added test statistics
Fixed #5995
This PR adds test statistics views to the part and build pages which provides overview about the accumulated count of the passed/failed tests.
Deploy Preview for inventree-web-pui-preview ready!
| Name | Link |
|---|---|
| Latest commit | 375ad66fa7c1d84629169b937c9986a554900a44 |
| Latest deploy log | https://app.netlify.com/sites/inventree-web-pui-preview/deploys/66a9d0ad3daad60008d3872c |
| Deploy Preview | https://deploy-preview-7164--inventree-web-pui-preview.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
Lighthouse |
1 paths audited Performance: 100 (no change from production) Accessibility: 86 (no change from production) Best Practices: 92 (no change from production) SEO: 70 (no change from production) PWA: - View the detailed breakdown and full score reports |
To edit notification comments on pull requests, go to your Netlify site configuration.
Codecov Report
Attention: Patch coverage is 28.09917% with 87 lines in your changes missing coverage. Please review.
Project coverage is 83.46%. Comparing base (
fdd9b7c) to head (375ad66). Report is 319 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #7164 +/- ##
==========================================
- Coverage 83.51% 83.46% -0.05%
==========================================
Files 1114 1119 +5
Lines 49376 49741 +365
Branches 1568 1629 +61
==========================================
+ Hits 41234 41517 +283
- Misses 7746 7797 +51
- Partials 396 427 +31
| Flag | Coverage Δ | |
|---|---|---|
| backend | 85.24% <35.36%> (-0.10%) |
:arrow_down: |
| pui | 64.36% <12.82%> (+1.13%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@martonmiklos can you please merge in the latest changes from master, and then I can review :)
@martonmiklos can you please merge in the latest changes from master, and then I can review :)
@SchrodingersGat Done. There are two things what might need to be looked into:
-
As far as I saw filtering for datetime fields is not implemented in the PUI yet, so the date filtering is only available in the old UI.
-
I have not managed to hide the pagination (it does not makes any sense as we will always have 3 rows). I saw the enablePagination property, but it does not hide the pagination bar. Maybe I will report it to upstream if there is no trick to do that.
@martonmiklos where are you at with this one? :)
@martonmiklos where are you at with this one? :)
@SchrodingersGat could you please help how to properly specify links with two parameters here: https://github.com/martonmiklos/InvenTree/blob/a7cafc792e46c0e09441431126b4d3200328c983/src/backend/InvenTree/build/templates/build/build_base.html#L304 It works, but tests are failing, and I have not found any examples in the existing code.
I would suggest that you make a "generic" test statistics endpoint, and rather than pinning it against specific database instances, pass those as query parameters you can filter by.
Then you can have a single API endpoint and you can filter by:
- Stock Item
- Part
- Build Order
- etc
Hi there @martonmiklos!
- Is this done / ready for final review?
- Please stop force pushing/rebasing, this makes reviewing useless
Hi there @martonmiklos!
1. Is this done / ready for final review? 2. Please stop force pushing/rebasing, this makes reviewing useless
Hi @matmair I tried to get the CI passing, but now I have no idea why (or is it related to my changes) the SQlite failed.
@martonmiklos the sqlite test is currently broken for python 3.12, we are still struggling to understand this one. Are you happy with the PR otherwise?
Please fix the conflicts here and if you're satisfied with this I'm happy to merge it in
@martonmiklos apologies but it looks like there are still some conflicts. If you can address this in the next couple of days, I'll hold off merging anything else so that we can get this one done :)
@martonmiklos apologies but it looks like there are still some conflicts. If you can address this in the next couple of days, I'll hold off merging anything else so that we can get this one done :)
Done!
@martonmiklos a number of the frontend tests (playwright) are failing here - are they OK locally for you?
@martonmiklos a number of the frontend tests (playwright) are failing here - are they OK locally for you?
I managed to get the PUI locally and discovered (together with an another issue in the old UI) that I messed up the API urls for PUI. Now it works locally.
Ok, something is going on with the PUI tests, other PRs are failing too, when they should not be. I will have to look into this tomorrow
@martonmiklos thanks for the hard work here :) I Have fixed the other PUI tests so this is good to go now. Thanks for the ongoing contributions!
@martonmiklos when testing this on the "build order" page (for a part with only a small number of tests / results), there are a large number of queries running:
I'll open a new issue to address this, I would appreciate it if you could look into optimizing the API / database queries.
