chore: add test coverage (#4960)

This commit is contained in:
Alireza authored and GitHub committed 2025-04-16 15:56:52 -04:00
1 parent a41ed3bade
commit 91117f40f8
51 files changed
+1302 -346

No files matched your search

+13 -8
View File
@@ -24,6 +24,7 @@ const PROXY_TARGET = process.env.PROXY_TARGET;
const PROXY_DOMAIN = process.env.PROXY_DOMAIN;
const PROXY_PATH_REWRITE_FROM = process.env.PROXY_PATH_REWRITE_FROM;
const PROXY_PATH_REWRITE_TO = process.env.PROXY_PATH_REWRITE_TO;
const IS_COVERAGE = process.env.COVERAGE === 'true';
const OHIF_PORT = Number(process.env.OHIF_PORT || 3000);
const ENTRY_TARGET = process.env.ENTRY_TARGET || `${SRC_DIR}/index.js`;
@@ -134,14 +135,18 @@ module.exports = (env, argv) => {
},
}),
// Generate a service worker for fast local loads
new InjectManifest({
swDest: 'sw.js',
swSrc: path.join(SRC_DIR, 'service-worker.js'),
// Need to exclude the theme as it is updated independently
exclude: [/theme/],
// Cache large files for the manifests to avoid warning messages
maximumFileSizeToCacheInBytes: 1024 * 1024 * 50,
}),
...(IS_COVERAGE
? []
: [
new InjectManifest({
swDest: 'sw.js',
swSrc: path.join(SRC_DIR, 'service-worker.js'),
// Need to exclude the theme as it is updated independently
exclude: [/theme/],
// Cache large files for the manifests to avoid warning messages
maximumFileSizeToCacheInBytes: 1024 * 1024 * 50,
}),
]),
],
// https://webpack.js.org/configuration/dev-server/
devServer: {
+15
View File
@@ -0,0 +1,15 @@
---
sidebar_position: 14
sidebar_label: Test Coverage
---
# Test Coverage
## Playwright
Here's the test coverage report for our Playwright tests. Keep in mind that this doesn't include our Cypress tests, so our actual test coverage is likely higher than what's shown. We're focusing on Playwright for future OHIF testing, and we're really pushing to improve that coverage number.
You can view our latest test coverage report here:
- [OHIF Playwright Test Coverage Report](https://docs.ohif.org/coverage)
@@ -0,0 +1,17 @@
# Multiplanar Reconstruction
## Crosshairs
<div style={{padding:"56.25% 0 0 0", position:"relative"}}>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Qe3j6I-RdlA?si=UejPdGNSSZBS66qE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
# MPR Slab Oblique
<div style={{padding:"56.25% 0 0 0", position:"relative"}}>
<iframe src="https://player.vimeo.com/video/843233906?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameBorder="0" allow="autoplay; fullscreen; picture-in-picture" allowFullScreen style= {{ position:"absolute",top:0,left:0,width:"100%",height:"100%"}} title="measurement-report"></iframe>
</div>