Skip to content
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

[PUI] Add coverage testing #6881

Merged
merged 28 commits into from
Apr 3, 2024
Merged

Conversation

matmair
Copy link
Contributor

@matmair matmair commented Mar 27, 2024

This adds code coverage for the PUI tests and reporting to coveralls.

@matmair matmair added CI CI / unit testing ecosystem Platform UI Related to the React based User Interface labels Mar 27, 2024
@matmair matmair self-assigned this Mar 27, 2024
Copy link

netlify bot commented Mar 27, 2024

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit a1722af
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/660d0c231f7fd10008955451

@matmair matmair added the enhancement This is an suggested enhancement or new feature label Mar 27, 2024
@matmair matmair added this to the 0.15.0 milestone Mar 27, 2024
@matmair
Copy link
Contributor Author

matmair commented Mar 27, 2024

@wolflu05 you are more experienced in typescript/frontend. Is anything sticking out with this implementation?

@wolflu05
Copy link
Contributor

Sorry, I have not that much experience with frontend testing, never really done this before.

Regarding the changes on the vite config, does this mean we now ship sourcemaps with all builds? Is that wanted?

And the plugin you added, has that any influence on the build or dev environment?

@matmair
Copy link
Contributor Author

matmair commented Mar 28, 2024

Good points @wolflu05
Currently sourcemaps are build + shipped everytime - I will change this ASAP
Te plugins is only active when an enviroment variable is set so no impact on prod / local dev

@matmair matmair marked this pull request as ready for review March 28, 2024 21:04
@matmair
Copy link
Contributor Author

matmair commented Mar 28, 2024

I have removed tests I added before, they lowered the coverage a lot and were not that great - still wrapping my head around writing efficient tests. The focus of this PR - coverage - works great, expanding the tests should probably be part of further PUI development.

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
Copy link

sonarcloud bot commented Apr 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

@matmair matmair changed the title [PUI] Add coverage [PUI] Add coverage testing Apr 2, 2024
@SchrodingersGat
Copy link
Member

@matmair please address conflicts here

@matmair
Copy link
Contributor Author

matmair commented Apr 3, 2024

@SchrodingersGat merge is in!

@SchrodingersGat SchrodingersGat merged commit f58eacf into inventree:master Apr 3, 2024
23 checks passed
@SchrodingersGat SchrodingersGat deleted the pui-test-coverage branch April 3, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI / unit testing ecosystem enhancement This is an suggested enhancement or new feature Platform UI Related to the React based User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants