Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
212431e
test(frontend): configure testing infrastructure and coverage reporting
mehmetcanay Nov 30, 2026
f287886
test(frontend): configure shared Vitest setup and cleanup
mehmetcanay Nov 30, 2026
6ccd620
test(frontend): configure MSW network interception
mehmetcanay Nov 30, 2026
0715d56
test(frontend): add shared mock API handlers and fixtures
mehmetcanay Nov 30, 2026
dbf2657
test(frontend): add isolated React rendering and query client utilities
mehmetcanay Nov 30, 2026
7fd04a2
test(frontend): add number formatting utility tests
mehmetcanay Nov 30, 2026
edc5601
test(frontend): add HTML escaping utility tests
mehmetcanay Nov 30, 2026
f389774
test(frontend): add external URL validation tests
mehmetcanay Nov 30, 2026
532d962
test(frontend): add SVG chart download utility tests
mehmetcanay Nov 30, 2026
fc8e8a4
test(frontend): add study picker ranking utility tests
mehmetcanay Nov 30, 2026
00fee05
test(frontend): extend biomarker statistics coverage
mehmetcanay Nov 30, 2026
6494f2a
test(frontend): extend longitudinal retention utility coverage
mehmetcanay Nov 30, 2026
fd9a64f
test(frontend): extend chord diagram transformation coverage
mehmetcanay Nov 30, 2026
addb8f7
test(frontend): add biomarker chart configuration tests
mehmetcanay Nov 30, 2026
f18cd3a
refactor(frontend): reuse shared HTML escaping utility
mehmetcanay Nov 30, 2026
9079dd7
test(frontend): add longitudinal chart configuration tests
mehmetcanay Nov 30, 2026
38db8b4
fix(frontend): prevent inherited properties in race color lookup
mehmetcanay Nov 30, 2026
7b60050
test(frontend): add race distribution chart configuration tests
mehmetcanay Nov 30, 2026
a7ac63e
test(frontend): add comprehensive API client tests
mehmetcanay Nov 30, 2026
342bdf5
test(frontend): add CDM API tests
mehmetcanay Nov 30, 2026
b93349c
test(frontend): add cohort API and metadata contract tests
mehmetcanay Nov 30, 2026
042f86c
test(frontend): add biomarker API tests
mehmetcanay Nov 30, 2026
659096e
test(frontend): add longitudinal API tests
mehmetcanay Nov 30, 2026
d909168
refactor(frontend): simplify redundant API tests
mehmetcanay Nov 30, 2026
af99816
refactor(frontend): extract shared chart testing utility
mehmetcanay Nov 30, 2026
93e6297
refactor(frontend): simplify chart configuration tests
mehmetcanay Nov 30, 2026
b85647a
test(frontend): add mappings API tests
mehmetcanay Nov 30, 2026
d27c23b
test(frontend): add race distribution API tests
mehmetcanay Nov 30, 2026
796dfcf
test(frontend): add study picker API tests
mehmetcanay Nov 30, 2026
06202eb
test(frontend): add study picker hook tests
mehmetcanay Nov 30, 2026
04a4f8f
test(frontend): add biomarker hook tests
mehmetcanay Nov 30, 2026
f984e38
test(frontend): add longitudinal hook tests
mehmetcanay Nov 30, 2026
e4a44d6
test(frontend): add cohort longitudinal hook tests
mehmetcanay Nov 30, 2026
c499554
test(frontend): add mappings hook tests
mehmetcanay Nov 30, 2026
efe534e
test(frontend): add race distribution hook tests
mehmetcanay Nov 30, 2026
a5fa2b1
test(frontend): add home statistics hook tests
mehmetcanay Nov 30, 2026
9bc40dd
test(frontend): add cohort table hook tests
mehmetcanay Nov 30, 2026
c6d9c32
test(frontend): add ranking table hook tests
mehmetcanay Nov 30, 2026
1a82cbc
test(frontend): add ECharts lifecycle hook tests
mehmetcanay Nov 30, 2026
8a98e7d
test(frontend): add mobile detection hook tests
mehmetcanay Nov 30, 2026
8f58ec7
test(frontend): add color indicator component tests
mehmetcanay Nov 30, 2026
b67ef8f
test(frontend): add empty state component tests
mehmetcanay Nov 30, 2026
eed27d8
test(frontend): add error state component tests
mehmetcanay Nov 30, 2026
1e3c995
test(frontend): add loading state component tests
mehmetcanay Nov 30, 2026
7e6c56d
fix(frontend): preserve inherited combobox disabled state
mehmetcanay Nov 30, 2026
a206fc7
test(frontend): add single-select combobox tests
mehmetcanay Nov 30, 2026
11ba156
test(frontend): add multi-select combobox tests
mehmetcanay Nov 30, 2026
578c422
test(frontend): add page layout component tests
mehmetcanay Nov 30, 2026
4db9c1c
test(frontend): add footer component tests
mehmetcanay Nov 30, 2026
2998ab8
fix(frontend): preserve active section in mobile navigation
mehmetcanay Nov 30, 2026
929b8d7
test(frontend): add header component tests
mehmetcanay Nov 30, 2026
2668d87
test(frontend): add cohort card component tests
mehmetcanay Nov 30, 2026
39d767e
test(frontend): add cohort table component tests
mehmetcanay Nov 30, 2026
770d67a
test(frontend): add cohort page integration tests
mehmetcanay Nov 30, 2026
1958a9c
test(frontend): add biomarker boxplot component tests
mehmetcanay Nov 30, 2026
d0e557d
test(frontend): add biomarker page integration tests
mehmetcanay Nov 30, 2026
03cc429
test(frontend): add ranking action component tests
mehmetcanay Dec 1, 2026
a5c49a5
test(frontend): add ranking card component tests
mehmetcanay Dec 1, 2026
a2ec682
test(frontend): add ranking table component tests
mehmetcanay Dec 1, 2026
359a481
test(frontend): add ranking results component tests
mehmetcanay Dec 1, 2026
1629ac7
test(frontend): add study picker page integration tests
mehmetcanay Dec 1, 2026
d72a245
fix(frontend): reconcile longitudinal chart selection with visible se…
mehmetcanay Dec 1, 2026
d15f1f5
test(frontend): add longitudinal chart component tests
mehmetcanay Dec 1, 2026
57db733
fix(frontend): require valid retention measurements for visualization
mehmetcanay Dec 1, 2026
09e90d1
test(frontend): add longitudinal page integration tests
mehmetcanay Dec 1, 2026
11b09a3
test(frontend): add cohort longitudinal page integration tests
mehmetcanay Dec 1, 2026
68d8f5e
test(frontend): add chord diagram component tests
mehmetcanay Dec 1, 2026
cc68be4
test(frontend): add modality selector component tests
mehmetcanay Dec 1, 2026
76bb902
test(frontend): add mappings page integration tests
mehmetcanay Dec 1, 2026
e6c8482
test(frontend): add race distribution chart component tests
mehmetcanay Dec 1, 2026
29a64f0
fix(frontend): handle race distribution loading and error states
mehmetcanay Dec 1, 2026
35c7540
test(frontend): add race distribution page integration tests
mehmetcanay Dec 1, 2026
195692c
test(frontend): add home page integration tests
mehmetcanay Dec 1, 2026
d84ea1e
test(frontend): add contact page integration tests
mehmetcanay Dec 1, 2026
cfa2dae
fix(frontend): add race distribution analytics page title
mehmetcanay Dec 1, 2026
6c6a88c
test(frontend): add analytics utility and privacy tests
mehmetcanay Dec 1, 2026
259b6a7
test(frontend): add analytics consent context tests
mehmetcanay Dec 1, 2026
d8413cc
refactor(frontend): isolate analytics withdrawal reload
mehmetcanay Dec 1, 2026
dcba69c
test(frontend): add analytics consent and page tracking tests
mehmetcanay Dec 1, 2026
8d43118
fix(frontend): add suspense boundary to contact page route
mehmetcanay Dec 1, 2026
ad38a9c
test(frontend): add application routing and layout integration tests
mehmetcanay Dec 1, 2026
c7b86eb
test(frontend): add application provider tests
mehmetcanay Dec 1, 2026
05fdb50
test(frontend): increase timeout for lazy-loaded route assertions
mehmetcanay Dec 1, 2026
b3f1e83
test(frontend): extend cohort table sorting coverage
mehmetcanay Dec 1, 2026
5bc70b6
test(frontend): extend chord diagram geometry and interaction coverage
mehmetcanay Dec 1, 2026
71b299d
chore(frontend): exclude generated UI primitives from coverage
mehmetcanay Dec 1, 2026
fd13c6c
test(frontend): enforce minimum coverage thresholds
mehmetcanay Dec 1, 2026
91cc701
ci(frontend): enforce coverage thresholds and generate test reports
mehmetcanay Dec 1, 2026
e4166f3
ci(frontend): integrate Codecov coverage and test results
mehmetcanay Dec 1, 2026
7f01677
test(frontend): establish Playwright end-to-end testing infrastructure
mehmetcanay Dec 1, 2026
c8a013d
test(frontend): add shared Playwright API and network fixtures
mehmetcanay Dec 1, 2026
d5ab231
test(frontend): add browser navigation and responsive layout tests
mehmetcanay Dec 1, 2026
86b52ac
test(frontend): add cohort comparison end-to-end tests
mehmetcanay Dec 1, 2026
04525d4
test(frontend): add study picker end-to-end workflow tests
mehmetcanay Dec 1, 2026
6a8c712
test(frontend): add biomarker visualization and SVG export end-to-end…
mehmetcanay Dec 1, 2026
af95f13
test(frontend): add longitudinal visualization and responsive chart e…
mehmetcanay Dec 1, 2026
f8f928f
test(frontend): add mapping visualization and pagination end-to-end t…
mehmetcanay Dec 1, 2026
58828e0
test(frontend): add race distribution filtering and export end-to-end…
mehmetcanay Dec 1, 2026
5195bc6
test(frontend): add analytics consent and cross-tab privacy end-to-en…
mehmetcanay Dec 1, 2026
06b272a
ci(frontend): integrate Playwright end-to-end testing and reporting
mehmetcanay Dec 1, 2026
0c82003
docs(frontend): document automated testing and CI workflows
mehmetcanay Dec 1, 2026
6c68ba5
ci(backend): migrate Codecov test results to unified action
mehmetcanay Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/backend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ jobs:

- name: Upload test results to Codecov
if: ${{ !cancelled() && hashFiles('backend/junit.xml') != '' }}
uses: codecov/test-results-action@v1.2.1
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
files: backend/junit.xml
flags: backend
name: backend-tests
Expand Down
74 changes: 68 additions & 6 deletions .github/workflows/frontend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ concurrency:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 30

env:
CI: "true"

defaults:
run:
Expand All @@ -42,8 +45,67 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Run frontend checks
run: npm run check
env:
CI: "true"
VITE_API_URL: /api
- name: Run Oxlint
run: npm run lint:ci

- name: Run Vitest tests
run: |
npm run test:coverage -- \
--reporter=default \
--reporter=github-actions \
--reporter=junit \
--outputFile.junit=junit.xml

- name: Normalize coverage paths
run: sed -i 's|^SF:src/|SF:frontend/src/|' coverage/lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: frontend/coverage/lcov.info
flags: frontend
name: frontend-coverage
disable_search: true
fail_ci_if_error: false

- name: Upload Vitest results to Codecov
if: ${{ !cancelled() && hashFiles('frontend/junit.xml') != '' }}
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
files: frontend/junit.xml
flags: frontend
name: frontend-tests
disable_search: true
fail_ci_if_error: false

- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium

- name: Run Playwright tests
run: npm run test:e2e

- name: Upload Playwright report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: |
frontend/playwright-report/
frontend/test-results/
retention-days: 30
if-no-files-found: ignore

- name: Upload Playwright results to Codecov
if: ${{ !cancelled() && hashFiles('frontend/test-results/junit.xml') != '' }}
uses: codecov/codecov-action@v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
files: frontend/test-results/junit.xml
flags: frontend-e2e
name: frontend-e2e-tests
disable_search: true
fail_ci_if_error: false
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[![Backend checks](https://github.com/SCAI-BIO/PDataViewer/actions/workflows/backend-checks.yml/badge.svg?branch=main)](https://github.com/SCAI-BIO/PDataViewer/actions/workflows/backend-checks.yml)
[![Backend coverage](https://codecov.io/gh/SCAI-BIO/PDataViewer/branch/main/graph/badge.svg?flag=backend)](https://codecov.io/gh/SCAI-BIO/PDataViewer)
[![Frontend checks](https://github.com/SCAI-BIO/PDataViewer/actions/workflows/frontend-checks.yml/badge.svg?branch=main)](https://github.com/SCAI-BIO/PDataViewer/actions/workflows/frontend-checks.yml)
[![Frontend coverage](https://codecov.io/gh/SCAI-BIO/PDataViewer/branch/main/graph/badge.svg?flag=frontend)](https://codecov.io/gh/SCAI-BIO/PDataViewer)
[![Version](https://img.shields.io/github/v/release/SCAI-BIO/PDataViewer)](https://github.com/SCAI-BIO/PDataViewer/releases)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![DOI](https://zenodo.org/badge/785700235.svg)](https://zenodo.org/doi/10.5281/zenodo.13629127)
Expand Down Expand Up @@ -422,14 +423,43 @@ docker compose down

### Frontend Checks

The frontend defines one command for CI-compatible linting, testing, type checking, and production bundling:
Run the standard local development checks:

```bash
cd frontend
npm run check
```

This runs `lint:ci` (Oxlint with warnings denied), `test:run` (Vitest once), and `build` (`tsc -b && vite build`). Individual checks can also be run with `npm run lint`, `npm run typecheck`, `npm run test:run`, and `npm run build`. The frontend workflow can use the same `npm run check` command.
This runs Oxlint, Vitest, TypeScript validation, and the
Vite production build.

Run tests with coverage enforcement:

```bash
npm run test:coverage
```

The frontend requires at least 90% statement coverage,
80% branch coverage, 95% function coverage, and 95%
line coverage.

For browser-based end-to-end testing, install Chromium
and execute Playwright:

```bash
npx playwright install chromium
npm run test:e2e
```

Automated frontend tests use synthetic API responses and
do not require a running backend.

GitHub Actions runs linting, Vitest with coverage
enforcement, the production build, and Playwright tests.
Coverage and test results are uploaded to Codecov.

See the [frontend documentation](frontend/README.md)
for additional testing commands and configuration.

### Backend Linting

Expand Down
19 changes: 19 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ coverage:
- backend
informational: true

frontend:
target: 95%
threshold: 0%
flags:
- frontend
informational: true

patch:
default:
informational: true
Expand All @@ -24,12 +31,24 @@ coverage:
- backend
informational: true

frontend:
target: 95%
threshold: 0%
flags:
- frontend
informational: true

flags:
backend:
paths:
- backend/src/pdataviewer/
carryforward: true

frontend:
paths:
- frontend/src/
carryforward: true

comment:
layout: "diff, flags, files"
behavior: default
Expand Down
9 changes: 9 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@ dist-ssr
*.sln
*.sw?

# Test and coverage reports
coverage/
junit.xml

# Playwright
playwright-report/
test-results/
playwright/.cache/

.env.production
Loading
Loading