Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
f6d85bf
feat: native OpenSeadragon WSI viewer for HE resources
raylim Jun 10, 2026
ced6589
feat: add WSIHESlides tab driven by msk_wsi_tile_server_url config
raylim Jun 10, 2026
e1c58ea
feat: native H&E slide viewer using OpenSeadragon
raylim Jun 10, 2026
690b8c0
feat(wsi): redesign sidebar to match iframe viewer style
raylim Jun 10, 2026
99e4801
feat(wsi): sort slides chronologically by block_number
raylim Jun 10, 2026
7636916
feat(wsi): add tooltips and links to sidebar metadata
raylim Jun 10, 2026
46a6e3e
fix(wsi): fix oncotree links to use new oncotree.mskcc.org root URL
raylim Jun 10, 2026
f449eab
perf(wsi): prefetch slide metadata to eliminate cold-open delay
raylim Jun 11, 2026
865f3e2
fix(wsi): prevent race condition causing slides to never load
raylim Jun 11, 2026
6dc8877
wsi: fix prefetch concurrency and warm Redis thumbnail cache
raylim Jun 11, 2026
c2b9f60
wsi: read msk_wsi_tile_server_url from Java config service (not build…
raylim Jun 11, 2026
b4dcc7d
fix(wsi): address PR review issues
raylim Jun 11, 2026
8837da6
test(wsiViewer): add unit tests for WSIViewer computed properties and…
raylim Jun 11, 2026
9083716
security: remove dangerouslySetInnerHTML from NavPanel filter chips
raylim Jun 12, 2026
d5f74e2
fix(wsi): gate native WSI viewer on msk_wsi_tile_server_url config
raylim Jun 12, 2026
4eb20ad
test(wsi): add HE resource config and nativeViewer gating tests
raylim Jun 12, 2026
63fd669
feat(wsi): add coordinate navigation bar to OSD viewer
raylim Jun 12, 2026
a1f6388
feat(wsi): warm all gunicorn workers during slide prefetch
raylim Jun 12, 2026
3075123
feat(wsi): shareable view links via URL hash
raylim Jun 12, 2026
35d57a1
fix(wsi): fix share view URL hash — replaceState, async clipboard, js…
raylim Jun 12, 2026
0cb4d20
fix(wsi): start at image center on slide load, not top-left (0,0)
raylim Jun 12, 2026
6290dec
wsiViewer: fix share view hash being overwritten by OSD initial anima…
raylim Jun 12, 2026
1e4bc87
wsiViewer: fix centering at (1,1) and share view restoration
raylim Jun 12, 2026
f9d7e91
e2e: add Playwright tests for WSI viewer share-view and centering
raylim Jun 12, 2026
684973c
wsiViewer: add Download view button; add e2e download test
raylim Jun 12, 2026
5fd35dc
feat(wsi): remove legacy MSK whole-slide viewer (slides.mskcc.org)
raylim Jun 12, 2026
d3491d2
feat(wsi): show H&E/IHC slide counts on filter chips; grey out if 0
raylim Jun 12, 2026
1c56a49
feat(wsi): align toolbar buttons and filter chips with cBioPortal Boo…
raylim Jun 12, 2026
4276f83
fix: load .env early so CBIOPORTAL_URL is available to DefinePlugin
raylim Jun 13, 2026
7949c8a
style: align Share/Download buttons with cBioPortal look and feel
raylim Jun 13, 2026
3f0bafc
style: Share view button → clipboard icon + 'Copy link' label
raylim Jun 14, 2026
7467e28
style(wsi): use Bootstrap FA nav buttons via OSD custom element API; …
raylim Jun 14, 2026
52d4696
fix(wsi): prefetch thumbnail in mountOSD; show spinner while loading
raylim Jun 14, 2026
ef9823f
fix(wsiViewer): handle cached-image case where onLoad never fires
raylim Jun 14, 2026
51e36fc
fix(wsiViewer): reliably show thumbnail on slide switch
raylim Jun 14, 2026
144482f
fix(wsiViewer): eliminate warmup OOM, parallel thumbnail prefetch, ad…
raylim Jun 14, 2026
e35eadd
fix(wsiViewer): add data-testid to share/download buttons; update e2e…
raylim Jun 14, 2026
803ba22
fix(wsi): instant slide-loading spinner instead of faded LoadingIndic…
raylim Jun 14, 2026
415935a
fix(wsi): guarantee loading spinner is visible for ≥250ms on slide sw…
raylim Jun 14, 2026
c26b229
fix(wsi): decouple spinnerVisible from viewerReady to prevent stale s…
raylim Jun 14, 2026
d479e5a
feat(wsi): show barcode section (S1, S4…) in slide sub-label
raylim Jun 14, 2026
8930d13
feat(wsi): use block label as primary slide identifier in sidebar
raylim Jun 14, 2026
615c330
feat(wsi): move stain qualifier to RHS column in slide list
raylim Jun 14, 2026
6f2d22f
feat(wsi): richer sidebar and RHS panel — accession, tumor purity, TM…
raylim Jun 14, 2026
0e91729
feat(wsi): decoded block codes, larger fonts, path_dx_title in RHS
raylim Jun 15, 2026
db827c1
wsi: expand BLOCK_CODE_MAP with MSK dept codes and more anatomical codes
raylim Jun 15, 2026
f811a4f
wsi: debounce slide selection, throttle thumbnail prefetch, auto-retr…
raylim Jun 15, 2026
4b4a5c1
wsi: keep spinner until first tile drawn, not just OSD open
raylim Jun 15, 2026
328894d
wsi: replace grey-canvas wait with thumbnail underlay
raylim Jun 15, 2026
c2ca3de
wsi: fix spinner — use tile-loaded not tile-drawn (WebGL doesn't fire…
raylim Jun 15, 2026
aa6bdfd
wsi: add spinner/debounce e2e tests, add wsi-loading-spinner testid
raylim Jun 15, 2026
56d5bc9
wsi: enrich sample metadata from cBioPortal API instead of Databricks
raylim Jun 15, 2026
a70f8ac
wsi: clamp go-to coordinates to image boundaries
raylim Jun 15, 2026
70e9a01
wsi: widen coord inputs from 72px to 88px (fits 6-digit coordinates)
raylim Jun 15, 2026
33556de
wsi: separate IMPACT sequencing data into its own RHS sidebar section
raylim Jun 15, 2026
ec52268
wsi: add contextual links to RHS metadata
raylim Jun 15, 2026
74ee860
wsi: render each mutation link on its own line
raylim Jun 15, 2026
0297ad4
wsi: remove duplicate Magnification row from Pathology section
raylim Jun 15, 2026
6eac57c
wsi: make mutation links always underlined with vertical spacing
raylim Jun 15, 2026
885fb91
wsi: split mutation links on semicolons as well as commas
raylim Jun 15, 2026
202a89f
wsi: add per-mutation tooltip with type, VAF, and driver annotation
raylim Jun 15, 2026
f881560
wsi: fix mutation fetch for cBioPortal v7 and add per-mutation tooltips
raylim Jun 15, 2026
49d9b3a
wsi: index mutation details by both 'GENE Variant' and 'GENE p.Varian…
raylim Jun 15, 2026
efcdae2
wsi: fix mutation tooltip race condition and positional detail lookup
raylim Jun 15, 2026
5308c3b
wsi: hold mutation links until details are loaded so tooltips appear …
raylim Jun 15, 2026
51a399f
wsi: use mutations API as primary source so variants match cBioPortal…
raylim Jun 15, 2026
e82a2ab
feat(wsi): mutations table with gene/variant/type/VAF columns, MSI no…
raylim Jun 15, 2026
44167fb
WSI sidebar: annotation column icons, CNA table, patient/study links,…
raylim Jun 15, 2026
855a916
MutationTable: widen Gene column to 26% (from 22%)
raylim Jun 16, 2026
0b744e7
refactor(wsiViewer): DRY audit — extract shared helpers and style con…
raylim Jun 17, 2026
9c9be32
perf(wsiViewer): reduce unnecessary re-renders and GC pressure
raylim Jun 17, 2026
e3b1ed0
fix(wsiViewer): correct civic-logo.png require path (3 levels up, not 4)
raylim Jun 17, 2026
25f867b
fix(wsiViewer): show CIViC icon only for variants known to OncoKB (va…
raylim Jun 17, 2026
55fc6a9
test(wsiViewer): update variant assertion to match p. prefix stripping
raylim Jun 17, 2026
507a5dc
fix(wsiViewer): raise OSD navigator thumbnail above CoordBar
raylim Jun 17, 2026
105b756
chore: remove accidental playwright logs and debug screenshot; gitign…
raylim Jun 17, 2026
2d004d7
fix(wsiViewer): raise OSD navigator above CoordBar via element style …
raylim Jun 17, 2026
c079e75
feat(wsiViewer): align pathology slide counts and study resources
raylim Jun 24, 2026
a7b0a9b
fix(wsi): address PR review feedback
raylim Jun 24, 2026
0cfb297
fix(wsi): align cna labels and first-load mount
raylim Jun 24, 2026
c1837d2
feat(wsi): finish pathology timeline and viewer cleanup
raylim Jun 25, 2026
67264aa
Update WSI viewer and stabilize Playwright suite
raylim Jun 27, 2026
e9c64d1
Harden initial WSI slide load
raylim Jul 1, 2026
c1b1fe0
Extract WSI viewer orchestration helpers
raylim Jul 1, 2026
a4f9581
Fix patient-scoped WSI study counts
raylim Jul 7, 2026
594b4fe
Fix patient WSI clinical counts and pathology timeline
raylim Jul 7, 2026
9e9956b
Fix xy coordinate goto for OSD viewer
raylim Jul 7, 2026
84559e1
Fix: use bound handler for goToCoordinates callback
raylim Jul 7, 2026
9ef9aab
Add debug logging to coordinate goto handlers
raylim Jul 7, 2026
1cd4643
Clean up: remove debug logging from coordinate goto handlers
raylim Jul 7, 2026
9b4de74
Enable WSI viewer for development by setting default tile server URL
raylim Jul 7, 2026
bd9973b
Fix: Enable WSI viewer in dev environment by injecting rawServerConfig
raylim Jul 8, 2026
f7b3411
Fix: Enable session service in dev environment
raylim Jul 8, 2026
86d86d2
Fix: Add minimum required server config values for dev environment
raylim Jul 8, 2026
db775d2
Fix: Add user_display_name to dev server config
raylim Jul 8, 2026
e44c278
Fix: Correct tile server URL in dev config to point to actual tile se…
raylim Jul 8, 2026
945de00
Fix: Use window.location.origin for tile server URL in dev
raylim Jul 8, 2026
2f172fd
Fix: Bypass session service errors in dev environment
raylim Jul 8, 2026
164f9d6
Fix: Set user as anonymousUser to prevent session service calls
raylim Jul 8, 2026
0c0eb12
Hide WSI timepoint attributes from clinical data samples table
raylim Jul 8, 2026
3d68adc
Hide WSI timepoint attributes from study clinical data tab columns
raylim Jul 8, 2026
84dccf7
fix: timeline tooltip follows cursor to avoid obscuring clickthrough
raylim Jul 8, 2026
de7e644
test: verify mousePosition updates on every onMouseMove
raylim Jul 8, 2026
1b14d69
fix: suppress session-service error screen in dev mode
raylim Jul 8, 2026
a4f9b2b
Fix WSI viewer readiness and host verification flow
raylim Jul 8, 2026
635d2ce
Align WSI molecular utils with canonical mutation types
raylim Jul 9, 2026
587ffbd
refactor(wsi): collapse enrichment controller wiring
raylim Jul 13, 2026
926d9f0
refactor(wsi): simplify metadata sidebar helpers
raylim Jul 13, 2026
da45cb0
test(wsi): reduce spec setup repetition
raylim Jul 13, 2026
f44d5ed
Update native WSI viewer
raylim Jul 14, 2026
e7addfe
Refactor pathology timeline and WSI slide integration
raylim Jul 19, 2026
4428558
Add MSK WSI routing E2E test
raylim Jul 20, 2026
759e1a4
Add nginx WSI rehearsal test command
raylim Jul 20, 2026
1a4eb3f
Use explicit WSI namespace in dev proxy tests
raylim Jul 20, 2026
a22a05a
feat(wsi): add study-scoped viewer auth and dev rehearsal
raylim Jul 21, 2026
4f53c0f
Improve WSI slide loading recovery
raylim Jul 22, 2026
7dedf32
Complete pathology slide UI fixes
raylim Jul 22, 2026
b0e110a
Fix authenticated WSI viewer loading and recovery
raylim Jul 22, 2026
387ab3b
Clamp WSI shared-view viewport state
raylim Jul 22, 2026
fa2d671
Refactor pathology WSI data flow
raylim Jul 23, 2026
e5326d5
Wire association-backed pathology timeline events
raylim Jul 23, 2026
fc99edb
Strengthen native WSI pathology tests
raylim Jul 23, 2026
1b9ab93
Simplify native WSI hierarchy loading
raylim Jul 23, 2026
964a3d6
Remove unrelated WSI PR changes
raylim Jul 23, 2026
f00e858
Tighten native WSI APIs and cache tests
raylim Jul 23, 2026
c8eaad3
Improve local WSI viewer and e2e coverage
raylim Jul 27, 2026
77cc1db
feat(wsi): use backend hierarchy as sole metadata source
raylim Jul 30, 2026
674a0e7
test(wsi): remove obsolete bootstrap e2e coverage
raylim Jul 31, 2026
17cf5bc
test(wsi): align browser fixtures with backend hierarchy
raylim Jul 31, 2026
cea5cec
test: use a configured local study fixture
raylim Jul 31, 2026
a6eaa52
test: wait for virtual study removal
raylim Jul 31, 2026
88b2e77
test: wait for cohort navigation to settle
raylim Jul 31, 2026
0223429
test: wait for virtual study UI refresh
raylim Jul 31, 2026
779b639
test: use the virtual study removal control
raylim Jul 31, 2026
10ec48c
test: tolerate unavailable session service
raylim Jul 31, 2026
11f437b
test: detect proxied session service responses
raylim Jul 31, 2026
7d4bec8
test: skip unavailable virtual study removal
raylim Jul 31, 2026
2a00d37
test: complete local keycloak login
raylim Jul 31, 2026
3078583
test: align local E2E fixtures and download controls
raylim Jul 31, 2026
3c49d66
test: update remote E2E baselines for native viewer
raylim Jul 31, 2026
a8dac1e
test: stabilize structural variant column menu
raylim Jul 31, 2026
13b7fa8
test: stabilize local E2E fixtures and baselines
raylim Jul 31, 2026
4027727
test: update patient cohort screenshot baseline
raylim Jul 31, 2026
b5b214a
test: refresh remaining local E2E baselines
raylim Jul 31, 2026
b61c88e
fix WSI review findings
raylim Jul 31, 2026
85cfd95
consume normalized WSI hierarchy
raylim Aug 4, 2026
22636a5
source WSI sequencing dates from portal clinical data
raylim Aug 4, 2026
0ac776c
Fix WSI hierarchy refresh and navigation ordering
raylim Aug 5, 2026
0f93efe
Add resilient WSI slide thumbnails
raylim Aug 7, 2026
4ee6442
wsi: enable auth for saml portals
raylim Aug 7, 2026
5364876
wsi: align native viewer with slide access contract
raylim Aug 13, 2026
1770f9e
docs: document read-only WSI artifact boundary
raylim Aug 14, 2026
8f7b953
wsi: preserve exact pathology linkout scope
raylim Aug 17, 2026
84d0380
fix(wsi): send source metadata in request headers
raylim Aug 18, 2026
de9361d
Simplify pathology slide count display
raylim Aug 18, 2026
8966829
Enforce scoped WSI linkouts and hide legacy H&E resources
raylim Aug 18, 2026
77859fe
Align WSI E2E filter and thumbnail assertions
raylim Aug 18, 2026
9c04a23
ci: remove baseline security audit from WSI PR
raylim Aug 19, 2026
53b51ca
test: stabilize screenshot and patient timeline CI
raylim Aug 19, 2026
9a2ed50
Retry transient IGV initialization in E2E tests
raylim Aug 19, 2026
e05a9c9
Make public IGV screenshot setup deterministic
raylim Aug 19, 2026
b3468af
Reuse deterministic IGV setup in local E2E
raylim Aug 19, 2026
025cf20
Mock UCSC RefSeq metadata for IGV screenshots
raylim Aug 19, 2026
9e846db
Wait for requested IGV locus before screenshots
raylim Aug 19, 2026
9a77b94
Mock KRAS RefSeq metadata for IGV screenshots
raylim Aug 19, 2026
2bce428
Refresh IGV screenshots for native locus rendering
raylim Aug 19, 2026
717122c
test: complete deterministic IGV fixture baselines
raylim Aug 19, 2026
c496ba6
test: refresh public OncoPrint sorting baseline
raylim Aug 19, 2026
5a25523
test: make OncoPrint sorting scope deterministic
raylim Aug 19, 2026
4a7a441
test: refresh deterministic local screenshot baselines
raylim Aug 19, 2026
693a88d
ci: skip redundant Playwright browser downloads
raylim Aug 19, 2026
fde02a2
test: scope generic OncoPrint fixture deterministically
raylim Aug 19, 2026
2d9c24d
test: settle generic OncoPrint layout before capture
raylim Aug 19, 2026
38f1fc7
test: make custom tab pending fixture deterministic
raylim Aug 19, 2026
cbc2c73
test: account for OncoPrint border in fixture crop
raylim Aug 19, 2026
3c46183
test: keep OncoPrint fixture crop authoritative
raylim Aug 19, 2026
45703af
test: guard OncoPrint crop against async rewrites
raylim Aug 19, 2026
a02bcad
test: normalize OncoPrint crop border size
raylim Aug 19, 2026
e93ec8d
test: crop OncoPrint through fixed screenshot viewport
raylim Aug 19, 2026
f53e21d
test: normalize OncoPrint viewport border
raylim Aug 19, 2026
caf4a2b
ci: rerun transient remote e2e
raylim Aug 19, 2026
58e0d19
test: wait for x-vs-y chart after swapping axes
raylim Aug 19, 2026
a4d99e3
feat(wsi): show scanner image properties
raylim Aug 19, 2026
ca1500b
feat(wsi): add DSA annotation overlay (Option B)
raylim Jun 12, 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
9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,13 @@ jobs:
sudo systemctl stop unattended-upgrades.service apt-daily.service apt-daily-upgrade.service apt-daily.timer apt-daily-upgrade.timer 2>/dev/null || true
sudo killall apt apt-get 2>/dev/null || true
APT_OPTS='-o DPkg::Lock::Timeout=600 -o Dpkg::Use-Pty=0'
sudo apt-get $APT_OPTS update
npx playwright install chromium
BROWSER_CACHE="$HOME/.cache/ms-playwright"
if find "$BROWSER_CACHE" -maxdepth 1 -type d -name 'chromium-*' -print -quit 2>/dev/null | grep -q .; then
echo "Playwright Chromium cache hit — skipping browser download"
else
sudo apt-get $APT_OPTS update
npx playwright install chromium
fi
# Install Playwright's chromium system dependencies via apt
# directly with the same timeout/Pty options, so they don't
# hang on the apt lock either.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ api-e2e/validation.js
.vs/
.nx
.turbo
.playwright-mcp/
wsi-annotation-debug.png
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# cbioportal-frontend
This repo contains the frontend code for cBioPortal which uses React, MobX and TypeScript. Read more about the architecture of cBioPortal [here](https://docs.cbioportal.org/2.1-deployment/architecture-overview).

## Native WSI viewer artifact boundary

The native whole-slide-image viewer is a read-only client of the cBioPortal
WSI contract. For a patient view it requests the backend hierarchy, then
requests a per-slide access bundle from:

```text
GET /api/wsi/v2/slides/{studyId}/{imageId}/access
```

The bundle supplies the exact source URL, intrinsic tile metadata, thumbnail
artifact URL and dimensions, and a short-lived capability. The viewer sends
those values to the configured tile server for `/tiles` and `/thumbnails`.
The frontend does not discover slide paths, generate thumbnails, upload to
S3/Dell ECS, or write Databricks tables. It must never be given object-store
write credentials.

Thumbnail artifacts are therefore an upstream data-preparation concern. A
separate scheduled batch generates the artifacts and populates
`cdsi_prod.pathology_data_mining.slide_thumbnail_registry`; the Databricks
canonical export and cBioPortal core importer publish the resulting metadata
before the viewer can serve a slide. Runtime/on-demand generation is not a
production frontend behavior.

## Branch Information
| | main branch | upcoming release branch | later release candidate branch |
| --- | --- | --- | --- |
Expand Down
11 changes: 11 additions & 0 deletions end-to-end-test-playwright/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,19 @@ pnpm run test:ui # interactive runner + trace viewer
pnpm run report # open the last HTML report
./scripts/docker-test.sh timeline # grep-filter specs
CBIOPORTAL_URL=https://rc.cbioportal.org pnpm run test:docker

# Dedicated public SPECTRUM WSI profile (requires the local tile stack)
PW_SUITE=wsi \
WSI_VIEWER_BASE_URL=http://localhost:3000 \
CBIO_URL=http://localhost:8090 \
TILE_SERVER_URL=http://localhost:8081 \
pnpm exec playwright test
```

The default profile excludes the live WSI/pathology specs instead of marking
them skipped. Run them explicitly with `PW_SUITE=wsi`; they all use the public
`msk_spectrum_tme_2022` fixture and the source-bound v2 access contract.

The `test:docker:localdb` scripts set `PW_LOCAL=1` and point
`CBIOPORTAL_URL` at `http://localhost:8080`, then forward `tests/local`
to the wrapper. They assume a local cBioPortal backend is already
Expand Down
1 change: 1 addition & 0 deletions end-to-end-test-playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"test:ui": "./scripts/with-env.sh playwright test --headed --ui",
"test:docker": "./scripts/docker-test.sh",
"test:docker:update": "./scripts/docker-test.sh --update-snapshots",
"test:wsi:nginx": "WSI_PROXY_REHEARSAL=1 WSI_VIEWER_BASE_URL=${WSI_VIEWER_BASE_URL:-http://localhost:3001} playwright test tests/wsi-viewer.spec.ts",
"test:docker:localdb": "PW_LOCAL=1 CBIOPORTAL_URL=http://localhost:8080 ./scripts/docker-test.sh tests/local",
"test:docker:localdb:update": "PW_LOCAL=1 CBIOPORTAL_URL=http://localhost:8080 ./scripts/docker-test.sh tests/local --update-snapshots",
"test:localdb": "PW_LOCAL=1 LOCALDEV=0 CBIOPORTAL_URL=http://localhost:8080 playwright test --headed tests/local",
Expand Down
13 changes: 12 additions & 1 deletion end-to-end-test-playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,21 @@ const updateSnapshots = process.env.PW_UPDATE_SNAPSHOTS as
// the Keycloak/SAML helpers hang against the public origin and add
// 5+ minutes to slow shards. The localdb job opts in via PW_LOCAL=1.
const includeLocalDb = process.env.PW_LOCAL === '1';
const suite = process.env.PW_SUITE || 'public';
const liveWsiSpecs = [
'**/wsi-viewer.spec.ts',
'**/pathology-summary.spec.ts',
'**/pathology-study-clinical-data.spec.ts',
];
const wsiSpecs = [...liveWsiSpecs, '**/wsi-pathology-mocked.spec.ts'];

export default defineConfig({
testDir: './tests',
testIgnore: includeLocalDb ? [] : ['**/local/**'],
testMatch: suite === 'wsi' ? wsiSpecs : undefined,
testIgnore:
suite === 'wsi'
? ['**/local/**']
: [...(includeLocalDb ? [] : ['**/local/**']), ...liveWsiSpecs],
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { expectElementScreenshot } from './helpers/common';
* all earlier toggles.
*/

const COEXPRESSION_TIMEOUT = 30000;
// Public-portal profile switches can require a fresh backend round-trip after
// the old plot is unmounted. Allow the replacement plot enough time to mount.
const COEXPRESSION_TIMEOUT = 60000;
const TAB = 'div[data-test="coExpressionTabDiv"]';

const INITIAL_URL =
Expand Down Expand Up @@ -50,7 +52,6 @@ async function waitForCoexpressionPlot(page: Page) {
}

test.describe.serial('coexpression tab screenshot tests', () => {
test.describe.configure({ retries: 0 });
let page: Page;

test.beforeAll(async ({ browser }) => {
Expand Down
12 changes: 9 additions & 3 deletions end-to-end-test-playwright/tests/custom-tabs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function gotoWithCustomTabs(
await page.goto(url);
}

async function waitForMainTabs(page: Page, timeout = 50000) {
async function waitForMainTabs(page: Page, timeout = 120000) {
await expect(page.locator('.mainTabs')).toBeVisible({ timeout });
}

Expand Down Expand Up @@ -126,18 +126,24 @@ function runTabLocationTests(
const page = await browser.newPage({
viewport: { width: 2000, height: 1000 },
});
// Keep both conditional tabs pending for the duration of this
// assertion. The PatientView can take longer to reach the tab
// bar than the old two-second fixture delay, which otherwise
// lets the non-routed tab resolve and become visible before we
// assert its pending-state behavior.
const pendingHide = '()=>new Promise(()=>{})';
const conf = [
{
title: 'Async Tab',
id: 'customTab1',
location: tabLocation,
hideAsync: `()=>new Promise((r)=>setTimeout(()=>r(true),2000))`,
hideAsync: pendingHide,
},
{
title: 'Async Tab 2',
id: 'customTab2',
location: tabLocation,
hideAsync: `()=>new Promise((r)=>setTimeout(()=>r(true),2000))`,
hideAsync: pendingHide,
},
];
// Inject /customTab1 before the query string so the app
Expand Down
161 changes: 144 additions & 17 deletions end-to-end-test-playwright/tests/helpers/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ export async function expectPageScreenshot(
await expect(page).toHaveScreenshot(snapshotName, {
mask,
fullPage: opts.fullPage ?? false,
// Full-page patient/cohort views continue settling after the backend
// reports ajaxQuiet. Give Playwright enough time to observe two
// consecutive stable frames on the public portal.
timeout: 30000,
});
}

Expand Down Expand Up @@ -195,30 +199,153 @@ export async function setCheckboxChecked(
if (isChecked !== checked) await cb.click();
}

// IGV waits for UCSC cytoband metadata before laying out tracks. The public
// CI browser cannot reach that endpoint reliably, so serve the chromosome
// used by the deterministic screenshot fixtures locally.
const HG19_CYTOBAND_URL =
'https://hgdownload.soe.ucsc.edu/goldenPath/hg19/database/cytoBand.txt.gz';
const HG19_NCBI_REFSEQ_URL =
'https://hgdownload.soe.ucsc.edu/goldenPath/hg19/database/ncbiRefSeq.txt.gz';
const HG19_CHR7_CYTOBANDS = `chr7\t0\t2800000\tp22.3\tgneg
chr7\t2800000\t4500000\tp22.2\tgpos25
chr7\t4500000\t7300000\tp22.1\tgneg
chr7\t7300000\t13800000\tp21.3\tgpos100
chr7\t13800000\t16500000\tp21.2\tgneg
chr7\t16500000\t20900000\tp21.1\tgpos100
chr7\t20900000\t25500000\tp15.3\tgneg
chr7\t25500000\t28000000\tp15.2\tgpos50
chr7\t28000000\t28800000\tp15.1\tgneg
chr7\t28800000\t35000000\tp14.3\tgpos75
chr7\t35000000\t37200000\tp14.2\tgneg
chr7\t37200000\t43300000\tp14.1\tgpos75
chr7\t43300000\t45400000\tp13\tgneg
chr7\t45400000\t49000000\tp12.3\tgpos75
chr7\t49000000\t50500000\tp12.2\tgneg
chr7\t50500000\t54000000\tp12.1\tgpos75
chr7\t54000000\t58000000\tp11.2\tgneg
chr7\t58000000\t59900000\tp11.1\tacen
chr7\t59900000\t61700000\tq11.1\tacen
chr7\t61700000\t67000000\tq11.21\tgneg
chr7\t67000000\t72200000\tq11.22\tgpos50
chr7\t72200000\t77500000\tq11.23\tgneg
chr7\t77500000\t86400000\tq21.11\tgpos100
chr7\t86400000\t88200000\tq21.12\tgneg
chr7\t88200000\t91100000\tq21.13\tgpos75
chr7\t91100000\t92800000\tq21.2\tgneg
chr7\t92800000\t98000000\tq21.3\tgpos75
chr7\t98000000\t103800000\tq22.1\tgneg
chr7\t103800000\t104500000\tq22.2\tgpos50
chr7\t104500000\t107400000\tq22.3\tgneg
chr7\t107400000\t114600000\tq31.1\tgpos75
chr7\t114600000\t117400000\tq31.2\tgneg
chr7\t117400000\t121100000\tq31.31\tgpos75
chr7\t121100000\t123800000\tq31.32\tgneg
chr7\t123800000\t127100000\tq31.33\tgpos75
chr7\t127100000\t129200000\tq32.1\tgneg
chr7\t129200000\t130400000\tq32.2\tgpos25
chr7\t130400000\t132600000\tq32.3\tgneg
chr7\t132600000\t138200000\tq33\tgpos50
chr7\t138200000\t143100000\tq34\tgneg
chr7\t143100000\t147900000\tq35\tgpos75
chr7\t147900000\t152600000\tq36.1\tgneg
chr7\t152600000\t155100000\tq36.2\tgpos25
chr7\t155100000\t159138663\tq36.3\tgneg`;
const HG19_NCBI_REFSEQ = `125\tNM_201283.2\tchr7\t+\t55086709\t55224632\t55086970\t55224536\t10\t55086709,55209978,55210997,55214298,55218986,55220238,55221703,55223522,55224225,55224451,\t55087058,55210130,55211181,55214433,55219055,55220357,55221845,55223639,55224352,55224632,\t0\tEGFR\tcmpl\tcmpl\t0,1,0,1,1,1,0,1,1,2,
125\tNM_201282.2\tchr7\t+\t55086709\t55236328\t55086970\t55236222\t16\t55086709,55209978,55210997,55214298,55218986,55220238,55221703,55223522,55224225,55224451,55225355,55227831,55229191,55231425,55232972,55236215,\t55087058,55210130,55211181,55214433,55219055,55220357,55221845,55223639,55224525,55225446,55228031,55229324,55231516,55233130,55236328,\t0\tEGFR\tcmpl\tcmpl\t0,1,0,1,1,1,0,1,1,2,1,2,1,2,0,2,
125\tNM_005228.5\tchr7\t+\t55086709\t55279321\t55086970\t55273310\t28\t55086709,55209978,55210997,55214298,55218986,55220238,55221703,55223522,55224225,55225355,55227831,55229191,55231425,55232972,55238867,55240675,55241613,55242414,55248985,55259411,55260458,55266409,55268008,55268880,55269427,55270209,55272948,\t55087058,55210130,55211181,55214433,55219055,55220357,55221845,55223639,55225446,55228031,55229324,55231516,55233130,55238906,55240817,55241736,55242513,55249171,55259567,55260534,55266556,55268106,55269048,55269475,55270318,55279321,\t0\tEGFR\tcmpl\tcmpl\t0,1,0,1,1,1,0,1,1,2,1,2,1,2,1,2,1,2,0,2,2,0,0,0,0,0,1,1,
778\tNM_033360.4\tchr12\t-\t25358179\t25403863\t25368374\t25398318\t6\t25358179,25368370,25378547,25380167,25398207,25403684,\t25362845,25368494,25378707,25380346,25398329,25403863,\t0\tKRAS\tcmpl\tcmpl\t-1,0,2,0,0,-1,
778\tNM_004985.5\tchr12\t-\t25358179\t25403863\t25362728\t25398318\t5\t25358179,25378547,25380167,25398207,25403684,\t25362845,25378707,25380346,25398329,25403863,\t0\tKRAS\tcmpl\tcmpl\t0,2,0,0,-1,
778\tNM_001369786.1\tchr12\t-\t25358179\t25403863\t25368374\t25398318\t6\t25358179,25368370,25378547,25380167,25398207,25403697,\t25362845,25368494,25378707,25380346,25398329,25403863,\t0\tKRAS\tcmpl\tcmpl\t-1,0,2,0,0,-1,
778\tNM_001369787.1\tchr12\t-\t25358179\t25403863\t25362728\t25398318\t5\t25358179,25378547,25380167,25398207,25403697,\t25362845,25378707,25380346,25398329,25403863,\t0\tKRAS\tcmpl\tcmpl\t0,2,0,0,-1,
642\tNM_000546.6\tchr17\t-\t7571738\t7590808\t7572926\t7579912\t11\t7571738,7573926,7576852,7577018,7577498,7578176,7578370,7579311,7579699,7579838,7590694,\t7573008,7574033,7576926,7577155,7577608,7578289,7578554,7579590,7579721,7579940,7590808,\t0\tTP53\tcmpl\tcmpl\t2,0,1,2,0,1,0,0,2,0,-1,
80\tNM_001143990.2\tchr17\t+\t7589388\t7606820\t7591966\t7606804\t11\t7589388,7591965,7592541,7592907,7604058,7604776,7604974,7605661,7606060,7606310,7606560,\t7589542,7592397,7592640,7593019,7604147,7604867,7605107,7605870,7606164,7606445,7606820,\t0\tWRAP53\tcmpl\tcmpl\t-1,0,2,2,0,2,0,1,0,2,2,
1006\tNR_047551.1\tchr7\t-\t55247442\t55256642\t55256642\t55256642\t2\t55247442,55256549,\t55250170,55256642,\t0\tEGFR-AS1\tnone\tnone\t-1,-1,`;

export async function mockHg19CytobandEndpoint(page: Page): Promise<void> {
await page.route(HG19_CYTOBAND_URL, route =>
route.fulfill({
status: 200,
contentType: 'text/plain',
body: HG19_CHR7_CYTOBANDS,
})
);
await page.route(HG19_NCBI_REFSEQ_URL, route =>
route.fulfill({
status: 200,
contentType: 'text/plain',
body: HG19_NCBI_REFSEQ,
})
);
}

/**
* Wait until the IGV column container has rendered and stabilized.
* Polls until the LoadingIndicator is gone and the `.igv-column-container`
* reports a non-zero height that hasn't changed between two consecutive
* 500 ms intervals.
* Polls until the loading message is gone and the `.igv-column-container`
* reports a track-sized height that hasn't changed between two consecutive
* 500 ms intervals. The minimum height excludes the toolbar-only shell that
* IGV briefly mounts before its tracks have been laid out.
*/
export async function waitForIgvRendered(
page: Page,
timeout = 60000
): Promise<void> {
await page.waitForFunction(
() => {
if (document.querySelector('[data-test="LoadingIndicator"]'))
return false;
const igvCol = document.querySelector('.igv-column-container');
if (!igvCol) return false;
const h = (igvCol as HTMLElement).getBoundingClientRect().height;
const last = (window as any).__lastIgvColH;
(window as any).__lastIgvColH = h;
return h > 0 && last !== undefined && Math.abs(h - last) < 1;
},
null,
{ polling: 500, timeout }
);
// Public-server IGV initialization occasionally leaves only the toolbar
// mounted when an external genome request is transiently unavailable.
// Retry the same deterministic page once, but never accept the toolbar as
// a rendered result: screenshots must still wait for a real track layout.
for (let attempt = 0; attempt < 2; attempt++) {
try {
await expect(page.locator('.cnSegmentsMSKTab')).toBeVisible({
timeout,
});
await page.waitForFunction(
() => {
const igvColumn = Array.from(
document.querySelectorAll('.igv-column-container')
).find(element => {
const htmlElement = element as HTMLElement;
const rect = element.getBoundingClientRect();
return (
htmlElement.offsetParent !== null &&
getComputedStyle(element).visibility !== 'hidden' &&
rect.width > 0 &&
rect.height > 150
);
}) as HTMLElement | undefined;
if (!igvColumn) return false;
const locusSearch = document.querySelector(
'.igv-search-container input'
) as HTMLInputElement | null;
// The browser initially renders the whole-genome track
// while the requested gene locus is still being applied.
// Do not let that stable intermediate state reach a
// screenshot assertion.
if (locusSearch?.value.trim().toLowerCase() === 'all') {
return false;
}
const loadingText = Array.from(
document.querySelectorAll('body *')
).some(
el =>
el.textContent?.includes(
'Loading copy number segments data...'
) && (el as HTMLElement).offsetParent !== null
);
if (loadingText) return false;
const height = igvColumn.getBoundingClientRect().height;
const last = (window as any).__lastIgvColumnHeight;
(window as any).__lastIgvColumnHeight = height;
return last !== undefined && Math.abs(height - last) < 1;
},
null,
{ polling: 500, timeout }
);
return;
} catch (error) {
if (attempt === 1) throw error;
await page.reload({ waitUntil: 'domcontentloaded' });
}
}
}

/** Wait for the comparison-tab overlap chart to render. */
Expand Down
3 changes: 2 additions & 1 deletion end-to-end-test-playwright/tests/helpers/oncoprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { expect, Locator, Page } from '@playwright/test';
*/

/** The oncoprint is ready when: loader is gone, legend SVG has painted, controls are mounted. */
export async function waitForOncoprint(page: Page, timeoutMs = 20000) {
export async function waitForOncoprint(page: Page, timeoutMs = 60000) {
await expect(page.locator('.oncoprintLoadingIndicator')).toHaveCount(0, {
timeout: timeoutMs,
});
Expand Down Expand Up @@ -120,6 +120,7 @@ export async function expectOncoprintScreenshot(
) {
const target = page.locator(opts.selector ?? '#oncoprintDiv');


// If the view-dropdown ended up open from a prior interaction, close it
// so it doesn't leak into the screenshot (mirrors wdio behavior).
await page.evaluate(() => {
Expand Down
Loading
Loading