Merge branch 'master' into fix/tag-viewer-broken

This commit is contained in:
Davide Punzo 2020-12-03 11:39:23 +01:00 committed by GitHub
commit 4b5a43641a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
102 changed files with 1261 additions and 403 deletions

View File

@ -13,11 +13,23 @@ version: 2.1
## ##
orbs: orbs:
codecov: codecov/codecov@1.0.5 codecov: codecov/codecov@1.0.5
cypress: cypress-io/cypress@1.13.0 cypress: cypress-io/cypress@1.26.0
executors:
# Custom executor to override Cypress config
deploy-to-prod-executor:
docker:
- image: 'cypress/browsers:node14.15.0-chrome86-ff82'
environment:
CYPRESS_BASE_URL: https://ohif-staging.netlify.com/
chrome-and-pacs:
docker:
# Primary container image where all steps run.
- image: 'cypress/browsers:node14.15.0-chrome86-ff82'
- image: 'ohif/viewer-testdata:0.1-test'
defaults: &defaults defaults: &defaults
docker: docker:
- image: circleci/node:12.9.1 - image: circleci/node:14.15.0
environment: environment:
TERM: xterm # Enable colors in term TERM: xterm # Enable colors in term
QUICK_BUILD: true QUICK_BUILD: true
@ -170,7 +182,7 @@ jobs:
DEPLOY_TO_DEV: DEPLOY_TO_DEV:
docker: docker:
- image: circleci/node:12.9.1 - image: circleci/node:14.15.0
environment: environment:
TERM: xterm TERM: xterm
NETLIFY_SITE_ID: 32708787-c9b0-4634-b50f-7ca41952da77 NETLIFY_SITE_ID: 32708787-c9b0-4634-b50f-7ca41952da77
@ -185,7 +197,7 @@ jobs:
DEPLOY_TO_STAGING: DEPLOY_TO_STAGING:
docker: docker:
- image: circleci/node:12.9.1 - image: circleci/node:14.15.0
environment: environment:
TERM: xterm TERM: xterm
NETLIFY_SITE_ID: c7502ae3-b150-493c-8422-05701e44a969 NETLIFY_SITE_ID: c7502ae3-b150-493c-8422-05701e44a969
@ -200,7 +212,7 @@ jobs:
DEPLOY_TO_PRODUCTION: DEPLOY_TO_PRODUCTION:
docker: docker:
- image: circleci/node:12.9.1 - image: circleci/node:14.15.0
environment: environment:
TERM: xterm TERM: xterm
NETLIFY_SITE_ID: 79c4a5da-5c95-4dc9-84f7-45fd9dfe21b0 NETLIFY_SITE_ID: 79c4a5da-5c95-4dc9-84f7-45fd9dfe21b0
@ -257,7 +269,12 @@ jobs:
paths: . paths: .
DOCS_PUBLISH: DOCS_PUBLISH:
<<: *defaults docker:
# Gitbook fails due to graceful-fs updates above this node version :-(
- image: circleci/node:12.9.1
environment:
TERM: xterm # Enable colors in term
working_directory: ~/repo
steps: steps:
- checkout - checkout
- run: - run:
@ -317,16 +334,19 @@ workflows:
# E2E: PWA # E2E: PWA
- cypress/run: - cypress/run:
name: 'E2E: PWA' name: 'E2E: PWA'
executor: cypress/browsers-chrome76 executor: chrome-and-pacs
browser: chrome browser: chrome
pre-steps: pre-steps:
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global - run: |
add wait-on' # Use yarn latest # Clear yarn cache; update to latest
rm -rf ~/.yarn
npm i -g yarn
yarn -v
yarn: true yarn: true
record: false record: true
store_artifacts: false store_artifacts: true
working_directory: platform/viewer working_directory: platform/viewer
build: npx cross-env QUICK_BUILD=true yarn run build build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build
start: yarn run test:e2e:serve start: yarn run test:e2e:serve
spec: 'cypress/integration/common/**/*,cypress/integration/pwa/**/*' spec: 'cypress/integration/common/**/*,cypress/integration/pwa/**/*'
wait-on: 'http://localhost:3000' wait-on: 'http://localhost:3000'
@ -337,21 +357,22 @@ workflows:
path: platform/viewer/cypress/screenshots path: platform/viewer/cypress/screenshots
- store_artifacts: - store_artifacts:
path: platform/viewer/cypress/videos path: platform/viewer/cypress/videos
- store_test_results:
path: platform/viewer/cypress/results
requires: requires:
- UNIT_TESTS - UNIT_TESTS
# E2E: script-tag # E2E: script-tag
- cypress/run: - cypress/run:
name: 'E2E: Script Tag' name: 'E2E: Script Tag'
executor: cypress/browsers-chrome76 executor: chrome-and-pacs
browser: chrome browser: chrome
pre-steps: pre-steps:
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v' # Use yarn latest
add wait-on' # Use yarn latest
yarn: true yarn: true
record: false record: true
store_artifacts: false store_artifacts: true
working_directory: platform/viewer working_directory: platform/viewer
build: npx cross-env QUICK_BUILD=true yarn run build:package build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build:package
start: yarn run test:e2e:serve start: yarn run test:e2e:serve
spec: 'cypress/integration/common/**/*,cypress/integration/script-tag/**/*' spec: 'cypress/integration/common/**/*,cypress/integration/script-tag/**/*'
wait-on: 'http://localhost:3000' wait-on: 'http://localhost:3000'
@ -362,6 +383,8 @@ workflows:
path: platform/viewer/cypress/screenshots path: platform/viewer/cypress/screenshots
- store_artifacts: - store_artifacts:
path: platform/viewer/cypress/videos path: platform/viewer/cypress/videos
- store_test_results:
path: platform/viewer/cypress/results
requires: requires:
- UNIT_TESTS - UNIT_TESTS
@ -372,7 +395,7 @@ workflows:
# Update hub.docker.org # Update hub.docker.org
- cypress/run: - cypress/run:
name: 'Generate Percy Snapshots' name: 'Generate Percy Snapshots'
executor: cypress/browsers-chrome76 executor: chrome-and-pacs
browser: chrome browser: chrome
pre-steps: pre-steps:
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global
@ -380,7 +403,7 @@ workflows:
yarn: true yarn: true
store_artifacts: false store_artifacts: false
working_directory: platform/viewer working_directory: platform/viewer
build: npx cross-env QUICK_BUILD=true yarn run build build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build
# start server --> verify running --> percy + chrome + cypress # start server --> verify running --> percy + chrome + cypress
command: yarn run test:e2e:dist command: yarn run test:e2e:dist
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}'
@ -449,7 +472,7 @@ workflows:
# and record a Cypress dashboard test run # and record a Cypress dashboard test run
- cypress/run: - cypress/run:
name: 'Generate Percy Snapshots' name: 'Generate Percy Snapshots'
executor: cypress/browsers-chrome76 executor: chrome-and-pacs
browser: chrome browser: chrome
pre-steps: pre-steps:
- run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global
@ -457,7 +480,7 @@ workflows:
yarn: true yarn: true
store_artifacts: false store_artifacts: false
working_directory: platform/viewer working_directory: platform/viewer
build: npx cross-env QUICK_BUILD=true yarn run build build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build
# start server --> verify running --> percy + chrome + cypress # start server --> verify running --> percy + chrome + cypress
command: yarn run test:e2e:dist command: yarn run test:e2e:dist
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}'

4
.github/stale.yml vendored
View File

@ -2,9 +2,9 @@
# https://github.com/apps/stale # https://github.com/apps/stale
# #
# Number of days of inactivity before an issue becomes stale # Number of days of inactivity before an issue becomes stale
daysUntilStale: 21 daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed # Number of days of inactivity before a stale issue is closed
daysUntilClose: 7 daysUntilClose: 9000
# Issues with these labels will never be considered stale # Issues with these labels will never be considered stale
exemptLabels: exemptLabels:
- 'Story :raised_hands:' - 'Story :raised_hands:'

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.8.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.16...@ohif/extension-vtk@1.8.0) (2020-11-30)
### Features
* **i18n:** Added de (German) translations ([2fff2d5](https://github.com/OHIF/Viewers/commit/2fff2d511fa1d36bdd6476da4ffa5684bf55374f))
## [1.7.16](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.15...@ohif/extension-vtk@1.7.16) (2020-11-19) ## [1.7.16](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.15...@ohif/extension-vtk@1.7.16) (2020-11-19)
**Note:** Version bump only for package @ohif/extension-vtk **Note:** Version bump only for package @ohif/extension-vtk

View File

@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-vtk", "name": "@ohif/extension-vtk",
"version": "1.7.16", "version": "1.8.0",
"description": "OHIF extension for VTK.js", "description": "OHIF extension for VTK.js",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",

View File

@ -0,0 +1,3 @@
{
"Rotate": "Drehen"
}

View File

@ -0,0 +1,7 @@
import Buttons from './Buttons.json';
export default {
de: {
Buttons,
},
};

View File

@ -1,7 +1,9 @@
import en from './en'; import en from './en';
import es from './es'; import es from './es';
import de from './de';
export default { export default {
...en, ...en,
...es ...es,
...de,
}; };

View File

@ -28,6 +28,7 @@
"test:unit": "jest --collectCoverage", "test:unit": "jest --collectCoverage",
"test:unit:ci": "lerna run test:unit:ci --parallel --stream", "test:unit:ci": "lerna run test:unit:ci --parallel --stream",
"test:e2e": "lerna run test:e2e --stream", "test:e2e": "lerna run test:e2e --stream",
"test:e2e:script-tag": "lerna run test:e2e:script-tag --stream",
"test:e2e:ci": "lerna run test:e2e:ci --stream", "test:e2e:ci": "lerna run test:e2e:ci --stream",
"test:e2e:dist": "lerna run test:e2e:dist --stream", "test:e2e:dist": "lerna run test:e2e:dist --stream",
"test:e2e:serve": "lerna run test:e2e:serve --stream", "test:e2e:serve": "lerna run test:e2e:serve --stream",

View File

@ -21,12 +21,12 @@ describe('Queue', () => {
const mockedTimeout = jest.fn(timeout); const mockedTimeout = jest.fn(timeout);
const timer = queue.bind(mockedTimeout); const timer = queue.bind(mockedTimeout);
const start = Date.now(); const start = Date.now();
timer(120).then(now => { timer(1200).then(now => {
const elapsed = now - start; const elapsed = now - start;
expect(elapsed >= 120 && elapsed < 240).toBe(true); expect(elapsed >= 1200 && elapsed < 2400).toBe(true);
}); });
const end = await timer(120); const end = await timer(1200);
expect(end - start > 240).toBe(true); expect(end - start > 2400).toBe(true);
expect(mockedTimeout).toBeCalledTimes(2); expect(mockedTimeout).toBeCalledTimes(2);
}); });
it('should prevent task execution when queue limit is reached', async () => { it('should prevent task execution when queue limit is reached', async () => {
@ -34,15 +34,15 @@ describe('Queue', () => {
const mockedTimeout = jest.fn(timeout); const mockedTimeout = jest.fn(timeout);
const timer = queue.bind(mockedTimeout); const timer = queue.bind(mockedTimeout);
const start = Date.now(); const start = Date.now();
const promise = timer(120).then(time => time - start); const promise = timer(1200).then(time => time - start);
try { try {
await timer(120); await timer(1200);
} catch (e) { } catch (e) {
expect(Date.now() - start < 120).toBe(true); expect(Date.now() - start < 1200).toBe(true);
expect(e.message).toBe('Queue limit reached'); expect(e.message).toBe('Queue limit reached');
} }
const elapsed = await promise; const elapsed = await promise;
expect(elapsed >= 120 && elapsed < 240).toBe(true); expect(elapsed >= 1200 && elapsed < 2400).toBe(true);
expect(mockedTimeout).toBeCalledTimes(1); expect(mockedTimeout).toBeCalledTimes(1);
}); });
it('should safely bind tasks to the queue', async () => { it('should safely bind tasks to the queue', async () => {
@ -51,16 +51,16 @@ describe('Queue', () => {
const mockedTimeout = jest.fn(timeout); const mockedTimeout = jest.fn(timeout);
const timer = queue.bindSafe(mockedTimeout, mockedErrorHandler); const timer = queue.bindSafe(mockedTimeout, mockedErrorHandler);
const start = Date.now(); const start = Date.now();
const promise = timer(120).then(time => time - start); const promise = timer(1200).then(time => time - start);
await timer(120); await timer(1200);
expect(Date.now() - start < 120).toBe(true); expect(Date.now() - start < 1200).toBe(true);
expect(mockedErrorHandler).toBeCalledTimes(1); expect(mockedErrorHandler).toBeCalledTimes(1);
expect(mockedErrorHandler).nthCalledWith( expect(mockedErrorHandler).nthCalledWith(
1, 1,
expect.objectContaining({ message: 'Queue limit reached' }) expect.objectContaining({ message: 'Queue limit reached' })
); );
const elapsed = await promise; const elapsed = await promise;
expect(elapsed >= 120 && elapsed < 240).toBe(true); expect(elapsed >= 1200 && elapsed < 2400).toBe(true);
expect(mockedTimeout).toBeCalledTimes(1); expect(mockedTimeout).toBeCalledTimes(1);
}); });
}); });

View File

@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [0.53.0](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.52.8...@ohif/i18n@0.53.0) (2020-11-30)
### Bug Fixes
* Add syncTranslations script ([b161016](https://github.com/OHIF/Viewers/commit/b161016edb8808ff0d17ea637820837dca1ca3ce))
### Features
* **i18n:** Added de (German) translations ([2fff2d5](https://github.com/OHIF/Viewers/commit/2fff2d511fa1d36bdd6476da4ffa5684bf55374f))
* **i18n:** Added Russian language localization. ([d5b8974](https://github.com/OHIF/Viewers/commit/d5b89748c92c2cf5a88f54ae491adc31a1679705))
## [0.52.8](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.52.7...@ohif/i18n@0.52.8) (2020-04-07) ## [0.52.8](https://github.com/OHIF/Viewers/compare/@ohif/i18n@0.52.7...@ohif/i18n@0.52.8) (2020-04-07)
**Note:** Version bump only for package @ohif/i18n **Note:** Version bump only for package @ohif/i18n

View File

@ -1,6 +1,6 @@
{ {
"name": "@ohif/i18n", "name": "@ohif/i18n",
"version": "0.52.8", "version": "0.53.0",
"description": "Internationalization library for The OHIF Viewer", "description": "Internationalization library for The OHIF Viewer",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",

View File

@ -1,3 +0,0 @@
{
"No hotkeys found": "Nenhuma tecla de atalho está configurada para este aplicativo. As teclas de atalho podem ser configuradas no arquivo app-config.js do aplicativo."
}

View File

@ -1,7 +0,0 @@
import UserPreferencesModal from './UserPreferencesModal.json';
export default {
'ar': {
UserPreferencesModal,
}
};

View File

@ -0,0 +1,14 @@
{
"Browser": "Browser",
"Build Number": "Build Number",
"Latest Master Commits": "Letzter Master Commit",
"More details": "Mehr Details",
"Name": "Name",
"OHIF Viewer - About": "OHIF Viewer",
"OS": "OS",
"Report an issue": "Problem melden",
"Repository URL": "Repository URL",
"Value": "Wert",
"Version Information": "Versionsinformation",
"Visit the forum": "Das Forum besuchen"
}

View File

@ -0,0 +1,43 @@
{
"Acquired": "Akquiriert",
"Angle": "Winkel",
"Axial": "Axial",
"Bidirectional": "Bidirektional",
"Brush": "Pinsel",
"CINE": "CINE",
"Cancel": "Abbruch",
"Circle": "Kreis",
"Clear": "Entfernen",
"Coronal": "Coronal",
"Crosshairs": "Kreuzlinien",
"Download": "Herunterladen",
"Ellipse": "Ellipse",
"Elliptical": "Elliptisch",
"Flip H": "Spiegeln H",
"Flip V": "Spiegeln V",
"Freehand": "Freihand",
"Invert": "Invertieren",
"Layout": "$t(Common:Layout)",
"Length": "Länge",
"Levels": "Levels",
"Magnify": "Vergrössern",
"Manual": "Manuell",
"Measurements": "Messungen",
"More": "$t(Common:More)",
"Next": "$t(Common:Next)",
"Pan": "Verschieben",
"Play": "$t(Common:Play)",
"Previous": "$t(Common:Previous)",
"Probe": "Messung",
"ROI Window": "ROI Fenster",
"Rectangle": "Rechteck",
"Reset": "$t(Common:Reset)",
"Reset to Defaults": "Standardwerte",
"Rotate Right": "Rechts drehen",
"Sagittal": "Sagittal",
"Save": "Speichern",
"Stack Scroll": "Stapel",
"Stop": "$t(Common:Stop)",
"Themes": "Themes",
"Zoom": "Zoom"
}

View File

@ -0,0 +1,8 @@
{
"Next image": "$t(Common:Next) $t(Common:Image)",
"Play / Stop": "$t(Common:Play) / $t(Common:Stop)",
"Previous image": "$t(Common:Previous) $t(Common:Image)",
"Skip to first image": "Zum ersten $t(Common:Image)",
"Skip to last image": "Zum letzten $t(Common:Image)",
"fps": "fps"
}

View File

@ -0,0 +1,16 @@
{
"Close": "Schliessen",
"Image": "Bild",
"Layout": "Layout",
"Measurements": "Messungen",
"More": "Mehr",
"Next": "Nächstes",
"Play": "Abspielen",
"Previous": "Zurück",
"Reset": "Zurücksetzen",
"RowsPerPage": "Zeilen pro Seite",
"Series": "Serie",
"Show": "Zeigen",
"Stop": "Stopp",
"StudyDate": "Studien Datum"
}

View File

@ -0,0 +1,5 @@
{
"Clear dates": "Zeiträume löschen",
"End Date": "Bis",
"Start Date": "Ab"
}

View File

@ -0,0 +1,8 @@
{
"About": "Über",
"Back to Viewer": "Zurück zum Viewer",
"INVESTIGATIONAL USE ONLY": "NICHT ZUR BEFUNDUNG FREIGEGEBEN",
"Options": "Optionen",
"Preferences": "Einstellungen",
"Study list": "Studienliste"
}

View File

@ -0,0 +1,9 @@
{
"Criteria nonconformities": "Kriterien für Nichtkonformität",
"Delete": "Löschen",
"Description": "Beschreibung",
"MAX": "MAX",
"NonTargets": "NichtZiele",
"Relabel": "Umbenennen",
"Targets": "Ziele"
}

View File

@ -0,0 +1,10 @@
{
"AccessionNumber": "Accession #",
"Empty": "Leer",
"MRN": "MRN",
"Modality": "Modalität",
"PatientName": "Patientenname",
"StudyDate": "Studiendatum",
"StudyDescription": "Beschreibung",
"StudyList": "Studienliste"
}

View File

@ -0,0 +1,9 @@
{
"Cancel": "$t(Buttons:Cancel)",
"No hotkeys found": "Keine Tastaturkürzel konfiguriert. Tastaturkürzel können in der app-config.js Datei der Anwendung konfiguriert werden.",
"Reset to Defaults": "$t(Buttons:Reset to Defaults)",
"ResetDefaultMessage": "Einstellungen erfolgreich zurückgesetzt. <br /> Sie müssen <strong>Speichern</strong> um dieses abzuschliessen.",
"Save": "$t(Buttons:Save)",
"SaveMessage": "Einstellungen gesichert",
"User Preferences": "Benutzereinstellungen"
}

View File

@ -0,0 +1,14 @@
{
"emptyFilenameError": "Dateiname kann nicht leer sein.",
"fileType": "Dateityp",
"filename": "Dateiname",
"formTitle": "Bitte geben Sie die Dimensionen, Dateiname und den gewünschten Dateityp an.",
"imageHeight": "Bildhöhe (px)",
"imagePreview": "Bild Vorschau",
"imageWidth": "Bildbreite (px)",
"keepAspectRatio": "Seitenverhältnis erbehalten",
"loadingPreview": "Bildvorschau laden...",
"minHeightError": "Die minimale Höhe beträgt 100 Pixel.",
"minWidthError": "Die minimale Breiete beträgt 100 Pixel.",
"showAnnotations": "Annotationen anzeigen"
}

View File

@ -0,0 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json';
import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default {
'de': {
AboutModal,
Buttons,
CineDialog,
Common,
DatePicker,
Header,
MeasurementTable,
StudyList,
UserPreferencesModal,
ViewportDownloadForm,
}
};

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -1,19 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json'; import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json'; import CineDialog from './CineDialog.json';
import Common from './Common.json'; import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json'; import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json'; import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json'; import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json'; import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default { export default {
'es': { 'es': {
AboutModal,
Buttons, Buttons,
CineDialog, CineDialog,
Common, Common,
DatePicker,
Header, Header,
MeasurementTable, MeasurementTable,
StudyList, StudyList,
UserPreferencesModal, UserPreferencesModal,
ViewportDownloadForm,
} }
}; };

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -1,15 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json'; import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json'; import CineDialog from './CineDialog.json';
import Common from './Common.json'; import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json'; import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json'; import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default { export default {
'fr': { 'fr': {
AboutModal,
Buttons, Buttons,
CineDialog, CineDialog,
Common, Common,
DatePicker,
Header, Header,
MeasurementTable,
StudyList,
UserPreferencesModal, UserPreferencesModal,
ViewportDownloadForm,
} }
}; };

View File

@ -1,21 +1,23 @@
import ar from './ar/'; import de from './de/';
import en_US from './en-US/'; import en_US from './en-US/';
import es from './es/'; import es from './es/';
import fr from './fr/'; import fr from './fr/';
import ja_JP from './ja-JP/'; import ja_JP from './ja-JP/';
import nl from './nl/'; import nl from './nl/';
import pt_BR from './pt-BR/'; import pt_BR from './pt-BR/';
import ru from './ru/';
import vi from './vi/'; import vi from './vi/';
import zh from './zh/'; import zh from './zh/';
export default { export default {
...ar, ...de,
...en_US, ...en_US,
...es, ...es,
...fr, ...fr,
...ja_JP, ...ja_JP,
...nl, ...nl,
...pt_BR, ...pt_BR,
...ru,
...vi, ...vi,
...zh, ...zh,
}; };

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -1,15 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json'; import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json'; import CineDialog from './CineDialog.json';
import Common from './Common.json'; import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json'; import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json'; import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default { export default {
'ja-JP': { 'ja-JP': {
AboutModal,
Buttons, Buttons,
CineDialog, CineDialog,
Common, Common,
DatePicker,
Header, Header,
MeasurementTable,
StudyList,
UserPreferencesModal, UserPreferencesModal,
ViewportDownloadForm,
} }
}; };

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -1,11 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json'; import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json';
import Common from './Common.json'; import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json'; import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default { export default {
'nl': { 'nl': {
AboutModal,
Buttons, Buttons,
CineDialog,
Common, Common,
DatePicker,
Header, Header,
MeasurementTable,
StudyList,
UserPreferencesModal,
ViewportDownloadForm,
} }
}; };

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -4,7 +4,10 @@ import CineDialog from './CineDialog.json';
import Common from './Common.json'; import Common from './Common.json';
import DatePicker from './DatePicker.json'; import DatePicker from './DatePicker.json';
import Header from './Header.json'; import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json'; import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default { export default {
'pt-BR': { 'pt-BR': {
@ -14,6 +17,9 @@ export default {
Common, Common,
DatePicker, DatePicker,
Header, Header,
MeasurementTable,
StudyList,
UserPreferencesModal, UserPreferencesModal,
ViewportDownloadForm,
} }
}; };

View File

@ -0,0 +1,14 @@
{
"Browser": "Браузер",
"Build Number": "Номер сборки",
"Latest Master Commits": "Последние коммиты в мастер",
"More details": "Больше подробностей",
"Name": "Имя",
"OHIF Viewer - About": "OHIF Viewer - помощь",
"OS": "ОС",
"Report an issue": "Сообщить о проблеме",
"Repository URL": "Ссылка репозитория",
"Value": "Значение",
"Version Information": "Информация о версии",
"Visit the forum": "Посетить форум"
}

View File

@ -0,0 +1,44 @@
{
"Acquired": "Полученные",
"Angle": "Угол",
"Annotate": "Примечание",
"Axial": "По оси",
"Bidirectional": "Двунаправленная",
"Brush": "Кисть",
"CINE": "Видео",
"Cancel": "Отменить",
"Circle": "Круг",
"Clear": "Очистить",
"Coronal": "Корональный",
"Crosshairs": "Перекрестие",
"Download": "Скачать",
"Ellipse": "Эллипс",
"Elliptical": "Эллиптический",
"Flip H": "Перевернуть ↔",
"Flip V": "Перевернуть ↕",
"Freehand": "От руки",
"Invert": "Инвертировать",
"Layout": "$t(Common:Layout)",
"Length": "Длина",
"Levels": "Уровни",
"Magnify": "Увеличить",
"Manual": "Ручной",
"Measurements": "Измерения",
"More": "$t(Common:More)",
"Next": "$t(Common:Next)",
"Pan": "Переместить",
"Play": "$t(Common:Play)",
"Previous": "$t(Common:Previous)",
"Probe": "Проба",
"ROI Window": "Главная область",
"Rectangle": "Прямоугольник",
"Reset": "$t(Common:Reset)",
"Reset to Defaults": "$t(Common:Reset) к настройкам по-умолчанию",
"Rotate Right": "Повернуть вправо",
"Sagittal": "Сагиттальный",
"Save": "Сохранить",
"Stack Scroll": "Прокрутка серии",
"Stop": "$t(Common:Stop)",
"Themes": "Темы",
"Zoom": "Лупа"
}

View File

@ -0,0 +1,8 @@
{
"Next image": "$t(Common:Next) $t(Common:Image)",
"Play / Stop": "$t(Common:Play) / $t(Common:Stop)",
"Previous image": "$t(Common:Previous) $t(Common:Image)",
"Skip to first image": "Пропустить к первому $t(Common:Image)",
"Skip to last image": "Пропустить к последнему $t(Common:Image)",
"fps": "fps"
}

View File

@ -0,0 +1,20 @@
{
"Close": "Закрыть",
"Image": "Изображение",
"Last 30 days": "30 дней",
"Last 7 days": "7 дней",
"Layout": "Разбивка",
"Measurements": "Измерения",
"More": "Больше",
"Next": "Следующая",
"Play": "Проиграть",
"Previous": "Предыдущая",
"Reset": "Сбросить",
"RowsPerPage": "строк на странице",
"Series": "Серия",
"Show": "Показать",
"Stop": "Остановить",
"StudyDate": "Дата исследования",
"StudyList": "Список исследований",
"Today": "Сегодня"
}

View File

@ -0,0 +1,5 @@
{
"Clear dates": "Очистить даты",
"End Date": "Дата конца",
"Start Date": "Дата начала"
}

View File

@ -0,0 +1,8 @@
{
"About": "Справка",
"Back to Viewer": "Назад к Просмотрщику",
"INVESTIGATIONAL USE ONLY": "ТОЛЬКО ДЛЯ ИССЛЕДОВАНИЙ",
"Options": "Опции",
"Preferences": "Настройки",
"Study List": "Список исследований"
}

View File

@ -0,0 +1,11 @@
{
"Criteria nonconformities": "Критерии несоответствия",
"Delete": "Удалить",
"Description": "Описание",
"MAX": "МАКС",
"Measurements": "Измерения",
"NonTargets": "Нецелевые",
"Relabel": "Переназначить",
"StudyDate": "Дата исследования",
"Targets": "Цели"
}

View File

@ -0,0 +1,10 @@
{
"AccessionNumber": "Номер доступа",
"Description": "Описание",
"Empty": "Пусто",
"MRN": "MRN",
"Modality": "Модальность",
"PatientName": "Имя пациента",
"StudyDate": "Дата исследования",
"StudyDescription": "Описание"
}

View File

@ -0,0 +1,9 @@
{
"Cancel": "$t(Buttons:Cancel)",
"No hotkeys found": "Не найдено горячих клавиш",
"Reset to Defaults": "$t(Buttons:Reset to Defaults)",
"ResetDefaultMessage": "Настройки успешно сброшены. <br /> Вы должны <strong>Сохранить</strong> это действие нажав на кнопку.",
"Save": "$t(Buttons:Save)",
"SaveMessage": "Настройки сохранены",
"User Preferences": "Пользовательские настройки"
}

View File

@ -0,0 +1,14 @@
{
"emptyFilenameError": "Имя файла не может быть пустым.",
"fileType": "Тип файла",
"filename": "Имя файла",
"formTitle": "Пожалуйста, укажите разрешение, имя файла и желаемый тип изображения.",
"imageHeight": "Высота картинки (px)",
"imagePreview": "Предпросмотр",
"imageWidth": "Ширина картинки (px)",
"keepAspectRatio": "Сохранить соотношение сторон",
"loadingPreview": "Загружаю предпросмотр картинки...",
"minHeightError": "Минимальная высота - 100px.",
"minWidthError": "Минимальная ширина - 100px.",
"showAnnotations": "Показать аннотации"
}

View File

@ -0,0 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json';
import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default {
'ru': {
AboutModal,
Buttons,
CineDialog,
Common,
DatePicker,
Header,
MeasurementTable,
StudyList,
UserPreferencesModal,
ViewportDownloadForm,
}
};

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -1,17 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json'; import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json'; import CineDialog from './CineDialog.json';
import Common from './Common.json'; import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json'; import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json'; import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json'; import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default { export default {
'vi': { 'vi': {
AboutModal,
Buttons, Buttons,
CineDialog, CineDialog,
Common, Common,
DatePicker,
Header, Header,
MeasurementTable,
StudyList, StudyList,
UserPreferencesModal, UserPreferencesModal,
ViewportDownloadForm,
} }
}; };

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

View File

@ -1,19 +1,25 @@
import AboutModal from './AboutModal.json';
import Buttons from './Buttons.json'; import Buttons from './Buttons.json';
import CineDialog from './CineDialog.json'; import CineDialog from './CineDialog.json';
import Common from './Common.json'; import Common from './Common.json';
import DatePicker from './DatePicker.json';
import Header from './Header.json'; import Header from './Header.json';
import MeasurementTable from './MeasurementTable.json'; import MeasurementTable from './MeasurementTable.json';
import StudyList from './StudyList.json'; import StudyList from './StudyList.json';
import UserPreferencesModal from './UserPreferencesModal.json'; import UserPreferencesModal from './UserPreferencesModal.json';
import ViewportDownloadForm from './ViewportDownloadForm.json';
export default { export default {
'zh': { 'zh': {
AboutModal,
Buttons, Buttons,
CineDialog, CineDialog,
Common, Common,
DatePicker,
Header, Header,
MeasurementTable, MeasurementTable,
StudyList, StudyList,
UserPreferencesModal, UserPreferencesModal,
ViewportDownloadForm,
} }
}; };

View File

@ -0,0 +1,4 @@
cd src/locales/
npx locize --config-path ../../.locize sync --ver latest --update-values true --reference-language-only false
cd ../../
node ./writeLocaleIndexFiles.js

View File

@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.5.29](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.28...@ohif/viewer@4.5.29) (2020-12-03)
**Note:** Version bump only for package @ohif/viewer
## [4.5.28](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.27...@ohif/viewer@4.5.28) (2020-11-30)
**Note:** Version bump only for package @ohif/viewer
## [4.5.27](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.26...@ohif/viewer@4.5.27) (2020-11-30)
### Bug Fixes
* added MAX_CONCURRENCY limit as each webworker costs RAM, and machines with e.g 24 cores crash the process ([#2161](https://github.com/OHIF/Viewers/issues/2161)) ([d2e777b](https://github.com/OHIF/Viewers/commit/d2e777bafc70895fad15b91c47517e0eea622405))
## [4.5.26](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.25...@ohif/viewer@4.5.26) (2020-11-19) ## [4.5.26](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.5.25...@ohif/viewer@4.5.26) (2020-11-19)
**Note:** Version bump only for package @ohif/viewer **Note:** Version bump only for package @ohif/viewer

View File

@ -6,5 +6,10 @@
"requestTimeout": 10000, "requestTimeout": 10000,
"responseTimeout": 10000, "responseTimeout": 10000,
"projectId": "4oe38f", "projectId": "4oe38f",
"video": false "video": false,
"reporter": "junit",
"reporterOptions": {
"mochaFile": "cypress/results/test-output.xml",
"toConsole": true
}
} }

View File

@ -3,7 +3,7 @@ describe('OHIF Cornerstone Hotkeys', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {

View File

@ -3,12 +3,18 @@ describe('OHIF Cornerstone Toolbar', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {
cy.initCornerstoneToolsAliases(); cy.initCornerstoneToolsAliases();
cy.initCommonElementsAliases(); cy.initCommonElementsAliases();
cy.get('[data-cy="thumbnail-list"]:nth-child(1)').click();
const expectedText = 'Ser: 1';
cy.get('@viewportInfoBottomLeft').should('contains.text', expectedText);
cy.resetViewport(); cy.resetViewport();
}); });
@ -49,7 +55,7 @@ describe('OHIF Cornerstone Toolbar', () => {
}); });
it('checks if Stack Scroll tool will navigate across all series in the viewport', () => { it('checks if Stack Scroll tool will navigate across all series in the viewport', () => {
//Click on button and vefiry if icon is active on toolbar //Click on button and verify if icon is active on toolbar
cy.get('@stackScrollBtn') cy.get('@stackScrollBtn')
.click() .click()
.then($stackScrollBtn => { .then($stackScrollBtn => {
@ -85,7 +91,7 @@ describe('OHIF Cornerstone Toolbar', () => {
}); });
it('checks if Levels tool will change the contrast and brightness of an image in the viewport', () => { it('checks if Levels tool will change the contrast and brightness of an image in the viewport', () => {
//Click on button and vefiry if icon is active on toolbar //Click on button and verify if icon is active on toolbar
cy.get('@levelsBtn') cy.get('@levelsBtn')
.click() .click()
.then($levelsBtn => { .then($levelsBtn => {
@ -106,7 +112,7 @@ describe('OHIF Cornerstone Toolbar', () => {
}); });
it('checks if Pan tool will move the image inside the viewport', () => { it('checks if Pan tool will move the image inside the viewport', () => {
//Click on button and vefiry if icon is active on toolbar //Click on button and verify if icon is active on toolbar
cy.get('@panBtn') cy.get('@panBtn')
.click() .click()
.then($panBtn => { .then($panBtn => {
@ -120,7 +126,7 @@ describe('OHIF Cornerstone Toolbar', () => {
}); });
it('checks if Length annotation can be added on viewport and on measurements panel', () => { it('checks if Length annotation can be added on viewport and on measurements panel', () => {
//Click on button and vefiry if icon is active on toolbar //Click on button and verify if icon is active on toolbar
cy.get('@lengthBtn') cy.get('@lengthBtn')
.click() .click()
.then($lengthbtn => { .then($lengthbtn => {
@ -147,7 +153,7 @@ describe('OHIF Cornerstone Toolbar', () => {
}); });
it('checks if Angle annotation can be added on viewport and on measurements panel', () => { it('checks if Angle annotation can be added on viewport and on measurements panel', () => {
//Click on button and vefiry if icon is active on toolbar //Click on button and verify if icon is active on toolbar
cy.get('@angleBtn') cy.get('@angleBtn')
.click() .click()
.then($angleBtn => { .then($angleBtn => {
@ -192,7 +198,8 @@ describe('OHIF Cornerstone Toolbar', () => {
//Click on button //Click on button
cy.get('@cineBtn').click(); cy.get('@cineBtn').click();
//Vefiry if cine control overlay is being displayed
// Verify if cine control overlay is being displayed
cy.get('.cine-controls') cy.get('.cine-controls')
.as('cineControls') .as('cineControls')
.should('be.visible'); .should('be.visible');
@ -253,13 +260,15 @@ describe('OHIF Cornerstone Toolbar', () => {
cy.get('@cineBtn') cy.get('@cineBtn')
.click() .click()
.then(() => { .then(() => {
//Vefiry if cine control overlay is hidden // Verify that cine control overlay is hidden
cy.get('@cineControls').should('not.be.visible'); cy.get('@cineControls').should('not.exist');
}); });
}); });
it('checks if More button will prompt a modal with secondary tools', () => { it('checks if More button will prompt a modal with secondary tools', () => {
//Click on More button
cy.get('@moreBtn').click(); cy.get('@moreBtn').click();
//Verify if overlay is displayed //Verify if overlay is displayed
cy.get('.tooltip-toolbar-overlay') cy.get('.tooltip-toolbar-overlay')
.as('toolbarOverlay') .as('toolbarOverlay')
@ -288,9 +297,10 @@ describe('OHIF Cornerstone Toolbar', () => {
}); });
//Verify if overlay is hidden //Verify if overlay is hidden
cy.get('@toolbarOverlay').should('not.be.visible'); cy.get('@toolbarOverlay').should('not.exist');
}); });
it('checks if Layout tool will multiply the number of viewports displayed', () => { it('checks if Layout tool will multiply the number of viewports displayed', () => {
//Click on Layout button and verify if overlay is displayed //Click on Layout button and verify if overlay is displayed
cy.get('@layoutBtn') cy.get('@layoutBtn')
@ -415,7 +425,7 @@ describe('OHIF Cornerstone Toolbar', () => {
// TODO: We need a seperate test server for this to work. // TODO: We need a seperate test server for this to work.
// As anyone can save measurements on a different slice. // As anyone can save measurements on a different slice.
cy.get('.measurementItem'); //.should('not.exist'); //cy.get('.measurementItem'); //.should('not.exist');
//Close More button overlay //Close More button overlay
cy.get('@moreBtn').click(); cy.get('@moreBtn').click();
@ -439,6 +449,9 @@ describe('OHIF Cornerstone Toolbar', () => {
cy.get('@viewportInfoMidLeft').should('contains.text', 'F'); cy.get('@viewportInfoMidLeft').should('contains.text', 'F');
cy.get('@viewportInfoMidTop').should('contains.text', 'R'); cy.get('@viewportInfoMidTop').should('contains.text', 'R');
}); });
//Click on More button to close it
cy.get('@moreBtn').click();
}); });
it('check if Flip H tool will flip the image horizontally in the viewport', () => { it('check if Flip H tool will flip the image horizontally in the viewport', () => {
@ -451,6 +464,10 @@ describe('OHIF Cornerstone Toolbar', () => {
cy.get('[data-cy="flip h"]').click(); cy.get('[data-cy="flip h"]').click();
cy.get('@viewportInfoMidLeft').should('contains.text', 'L'); cy.get('@viewportInfoMidLeft').should('contains.text', 'L');
cy.get('@viewportInfoMidTop').should('contains.text', 'H'); cy.get('@viewportInfoMidTop').should('contains.text', 'H');
//Click on More button to close it
cy.get('@moreBtn').click();
cy.get('.tooltip-toolbar-overlay').should('not.exist');
}); });
it('check if Flip V tool will flip the image vertically in the viewport', () => { it('check if Flip V tool will flip the image vertically in the viewport', () => {
@ -463,5 +480,9 @@ describe('OHIF Cornerstone Toolbar', () => {
cy.get('[data-cy="flip v"]').click(); cy.get('[data-cy="flip v"]').click();
cy.get('@viewportInfoMidLeft').should('contains.text', 'R'); cy.get('@viewportInfoMidLeft').should('contains.text', 'R');
cy.get('@viewportInfoMidTop').should('contains.text', 'F'); cy.get('@viewportInfoMidTop').should('contains.text', 'F');
//Click on More button to close it
cy.get('@moreBtn').click();
cy.get('.tooltip-toolbar-overlay').should('not.exist');
}); });
}); });

View File

@ -3,7 +3,7 @@ describe('OHIF Download Snapshot File', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {

View File

@ -22,51 +22,54 @@ describe('OHIF Study List', function() {
//Wait result list to be displayed //Wait result list to be displayed
cy.waitStudyList(); cy.waitStudyList();
cy.get('@searchResult').should($list => { cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(3); expect($list.length).to.be.eq(1);
expect($list).to.contain('Juno'); expect($list).to.contain('Juno');
}); });
}); });
it('searches MRN with exact string', function() { it('searches MRN with exact string', function() {
cy.get('@MRN').type('ProstateX-0000'); cy.get('@MRN').type('0000003');
//Wait result list to be displayed
cy.waitStudyList();
cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(2);
expect($list).to.contain('ProstateX-0000');
});
});
it('searches Accession with exact string', function() {
cy.get('@AccessionNumber').type('0000481914');
//Wait result list to be displayed //Wait result list to be displayed
cy.waitStudyList(); cy.waitStudyList();
cy.get('@searchResult').should($list => { cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(1); expect($list.length).to.be.eq(1);
expect($list).to.contain('0000481914'); expect($list).to.contain('0000003');
});
});
it('searches Accession with exact string', function() {
cy.get('@AccessionNumber').type('0000155811');
//Wait result list to be displayed
cy.waitStudyList();
cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(1);
expect($list).to.contain('0000155811');
}); });
}); });
it('searches Modality with camel case', function() { it('searches Modality with camel case', function() {
cy.get('@modalities').type('Mr'); cy.get('@modalities').type('Ct');
//Wait result list to be displayed //Wait result list to be displayed
cy.waitStudyList(); cy.waitStudyList();
cy.get('@searchResult').should($list => { cy.get('@searchResult').should($list => {
// TODO: Why are we facing some inconsistency with this result? ¯\_(ツ)_/¯ expect($list.length).to.be.greaterThan(1);
expect($list.length).to.be.eq(9); expect($list).to.contain('CT');
expect($list).to.contain('MR');
}); });
}); });
/*
TODO: Currently broken in dicomweb-server
it('searches Description with exact string', function() { it('searches Description with exact string', function() {
cy.get('@StudyDescription').type('CHEST'); cy.get('@StudyDescription').type('PETCT');
//Wait result list to be displayed //Wait result list to be displayed
cy.waitStudyList(); cy.waitStudyList();
cy.get('@searchResult').should($list => { cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(2); expect($list.length).to.be.eq(1);
expect($list).to.contain('CHEST'); expect($list).to.contain('PETCT');
}); });
}); });
*/
it('changes Rows per page and checks the study count', function() { it('changes Rows per page and checks the study count', function() {
//Show Rows per page options //Show Rows per page options
@ -128,52 +131,60 @@ describe('OHIF Study List', function() {
//Wait result list to be displayed //Wait result list to be displayed
cy.waitStudyList(); cy.waitStudyList();
cy.get('@searchResult').should($list => { cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(3); expect($list.length).to.be.eq(1);
expect($list).to.contain('Juno'); expect($list).to.contain('Juno');
}); });
}); });
it('searches MRN with with exact string', function() { it('searches MRN with with exact string', function() {
cy.get('@patientNameOrMRN').type('ProstateX-0000'); cy.get('@patientNameOrMRN').type('Juno');
//Wait result list to be displayed
cy.waitStudyList();
cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(6);
expect($list).to.contain('ProstateX-0000');
});
});
it('searches Modality with exact string', function() {
cy.get('@accessionModalityDescription').type('MR');
//Wait result list to be displayed
cy.waitStudyList();
cy.get('@searchResult').should($list => {
// TODO: Why are we facing some inconsistency with this result? ¯\_(ツ)_/¯
expect($list.length).to.be.eq(9);
expect($list).to.contain('MR');
});
});
it('searches Accession with exact string', function() {
cy.get('@accessionModalityDescription').type('0000481914');
//Wait result list to be displayed //Wait result list to be displayed
cy.waitStudyList(); cy.waitStudyList();
cy.get('@searchResult').should($list => { cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(1); expect($list.length).to.be.eq(1);
expect($list).to.contain('0000481914'); expect($list).to.contain('Juno');
}); });
}); });
it('searches Description with exact string', function() { it('searches Modality with exact string', function() {
cy.get('@accessionModalityDescription').type('CHEST'); cy.get('@accessionModalityDescription').type('CT');
//Wait result list to be displayed //Wait result list to be displayed
cy.waitStudyList(); cy.waitStudyList();
cy.get('@searchResult').should($list => { cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(2); expect($list.length).to.be.eq(1);
expect($list).to.contain('CHEST'); expect($list).to.contain('CT');
}); });
}); });
/*
/*
TODO: Currently broken in dicomweb-server
it('searches Accession with exact string', function() {
cy.get('@accessionModalityDescription').type('0000155811');
//Wait result list to be displayed
cy.waitStudyList();
cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(1);
expect($list).to.contain('0000155811');
});
});
*/
/*
TODO: Currently broken in dicomweb-server
it('searches Description with exact string', function() {
cy.get('@accessionModalityDescription').type('PETCT');
//Wait result list to be displayed
cy.waitStudyList();
cy.get('@searchResult').should($list => {
expect($list.length).to.be.eq(1);
expect($list).to.contain('PETCT');
});
});
*/
it('changes Rows per page and checks the study count', function() { it('changes Rows per page and checks the study count', function() {
//Show Rows per page options //Show Rows per page options
const pageRows = [25, 50, 100]; const pageRows = [25, 50, 100];

View File

@ -3,12 +3,12 @@ describe('OHIF Study Viewer Page', function() {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(function() { beforeEach(function() {
cy.initCommonElementsAliases(); cy.initCommonElementsAliases();
cy.resetViewport(); cy.resetViewport().wait(50);
}); });
it('checks if series thumbnails are being displayed', function() { it('checks if series thumbnails are being displayed', function() {
@ -50,10 +50,10 @@ describe('OHIF Study Viewer Page', function() {
.click(); .click();
// Click "Relabel" // Click "Relabel"
cy.get('.btnAction') cy.get('.btnAction', { timeout: 10000 })
.first() .first()
.contains('Relabel') .contains('Relabel')
.click(); .click().should('be.visible');
// Search for "Bone" // Search for "Bone"
cy.get('.searchInput').type('Bone'); cy.get('.searchInput').type('Bone');
@ -68,11 +68,20 @@ describe('OHIF Study Viewer Page', function() {
// Verify if 'Bone' label was added // Verify if 'Bone' label was added
cy.get('.measurementLocation').should('contain.text', 'Bone'); cy.get('.measurementLocation').should('contain.text', 'Bone');
// Remove the measurement we just added
cy.get('.btnAction')
.last()
.contains('Delete')
.click()
// Close panel // Close panel
cy.get('@measurementsBtn').click(); cy.get('@measurementsBtn').click();
cy.get('@measurementsPanel').should('not.be.enabled'); cy.get('@measurementsPanel').should('not.be.enabled');
}); });
/*
TODO: Not sure why this is failing
it('checks if Description can be added to measurement item under Measurements panel', () => { it('checks if Description can be added to measurement item under Measurements panel', () => {
cy.addLengthMeasurement(); //Adding measurement in the viewport cy.addLengthMeasurement(); //Adding measurement in the viewport
cy.get('@measurementsBtn').click(); cy.get('@measurementsBtn').click();
@ -94,7 +103,19 @@ describe('OHIF Study Viewer Page', function() {
//Verify if descriptionText was added //Verify if descriptionText was added
cy.get('.measurementLocation').should('contain.text', descriptionText); cy.get('.measurementLocation').should('contain.text', descriptionText);
// Remove the measurement we just added
cy.get('.btnAction')
.last()
.contains('Delete')
.click()
// Close panel
cy.get('@measurementsBtn').click();
cy.get('@measurementsPanel').should('not.be.enabled');
}); });
*/
it('checks if measurement item can be deleted through the context menu on the viewport', function() { it('checks if measurement item can be deleted through the context menu on the viewport', function() {
cy.addLengthMeasurement([100, 100], [200, 100]); //Adding measurement in the viewport cy.addLengthMeasurement([100, 100], [200, 100]); //Adding measurement in the viewport
@ -108,6 +129,7 @@ describe('OHIF Study Viewer Page', function() {
.trigger('mouseup', x1, y1, { .trigger('mouseup', x1, y1, {
which: 3, which: 3,
}) })
.wait(300)
.then(() => { .then(() => {
//Contextmenu is visible //Contextmenu is visible
cy.get('.ToolContextMenu').should('be.visible'); cy.get('.ToolContextMenu').should('be.visible');
@ -122,12 +144,9 @@ describe('OHIF Study Viewer Page', function() {
cy.get('@measurementsBtn').click(); cy.get('@measurementsBtn').click();
//Verify measurements was removed from panel //Verify measurements was removed from panel
cy.get('.measurementItem'); cy.get('.measurementItem')
.should('not.exist')
// TODO: We need a seperate test server for this to work. .log('Annotation successfully removed');
// As anyone can save measurements on a different slice.
// .should('not.exist')
// .log('Annotation removed with success');
//Close panel //Close panel
cy.get('@measurementsBtn').click(); cy.get('@measurementsBtn').click();
@ -228,7 +247,7 @@ describe('OHIF Study Viewer Page', function() {
}); });
const expectedText = const expectedText =
'Ser: 5Img: 1 12/12512 x 512Loc: -15.40 mm Thick: 4.00 mm'; //'Img: 13 13/13'; 'Ser: 2Img: 13 13/13512 x 512Loc: 18.40 mm Thick: 3.00 mm'; //'Img: 13 13/13';
cy.get('@viewportInfoBottomLeft').should('contains.text', expectedText); cy.get('@viewportInfoBottomLeft').should('contains.text', expectedText);
}); });
@ -246,7 +265,8 @@ describe('OHIF Study Viewer Page', function() {
.trigger('mousemove', 'center', { which: 3 }) .trigger('mousemove', 'center', { which: 3 })
.trigger('mouseup'); .trigger('mouseup');
const expectedText = 'Zoom: 301%';
const expectedText = 'Zoom: 442%';
cy.get('@viewportInfoBottomRight').should('contains.text', expectedText); cy.get('@viewportInfoBottomRight').should('contains.text', expectedText);
}); });
@ -301,6 +321,6 @@ describe('OHIF Study Viewer Page', function() {
//close modal //close modal
cy.get('[data-cy="close-button"]').click(); cy.get('[data-cy="close-button"]').click();
cy.get('@aboutOverlay').should('not.be.enabled'); cy.get('@aboutOverlay').should('not.exist');
}); });
}); });

View File

@ -184,7 +184,7 @@ describe('OHIF User Preferences', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
cy.initCommonElementsAliases(); cy.initCommonElementsAliases();
// Check if application is in Spanish // Check if application is in Spanish
@ -217,7 +217,7 @@ describe('OHIF User Preferences', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {
@ -583,7 +583,7 @@ describe('OHIF User Preferences', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {

View File

@ -1,9 +1,12 @@
/*
Temporarily disabling as we transition to containerized PACS for E2E tests
describe('OHIF HTML Extension', () => { describe('OHIF HTML Extension', () => {
before(() => { before(() => {
cy.openStudyInViewer( cy.openStudyInViewer(
'1.2.826.0.13854362241694438965858641723883466450351448' '1.2.826.0.13854362241694438965858641723883466450351448'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
// TODO -> Commented these out until we get a seperate temporary PACS running on the CI. // TODO -> Commented these out until we get a seperate temporary PACS running on the CI.
@ -79,3 +82,4 @@ describe('OHIF HTML Extension', () => {
// cy.screenshot('PDF Extension - Should load PDF file'); // cy.screenshot('PDF Extension - Should load PDF file');
// }); // });
// }); // });
*/

View File

@ -1,3 +1,6 @@
/*
Temporarily disabling as we transition to containerized PACS for E2E tests
describe('OHIF Microscopy Extension', () => { describe('OHIF Microscopy Extension', () => {
before(() => { before(() => {
cy.openStudyModality('SM'); cy.openStudyModality('SM');
@ -27,3 +30,4 @@ describe('OHIF Microscopy Extension', () => {
cy.screenshot('Microscopy Extension - Should display loaded canvas'); cy.screenshot('Microscopy Extension - Should display loaded canvas');
}); });
}); });
*/

View File

@ -3,10 +3,14 @@ describe('OHIF VTK Extension', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1' '1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1'
); );
cy.expectMinimumThumbnails(7); cy.expectMinimumThumbnails(3);
// TODO: Added 1s wait because we are loading initial series list
// from QIDO-RS, which is breaking some cypress checks
//Waiting for the desired thumbnail content to be displayed //Waiting for the desired thumbnail content to be displayed
cy.get('[data-cy="thumbnail-list"]').should($list => { cy.get('[data-cy="thumbnail-list"]').wait(1000).should($list => {
expect($list).to.contain('CT WB 5.0 B35f'); expect($list).to.contain('CT WB 5.0 B35f');
}); });
@ -15,7 +19,7 @@ describe('OHIF VTK Extension', () => {
// has data from a drag-n-drop // has data from a drag-n-drop
// Drag and drop third thumbnail into first viewport // Drag and drop third thumbnail into first viewport
cy.get('[data-cy="thumbnail-list"]') cy.get('[data-cy="thumbnail-list"]')
.contains('CT WB 5.0 B35f') .eq(2)
.drag('.viewport-drop-target'); .drag('.viewport-drop-target');
//Select 2D MPR button //Select 2D MPR button

View File

@ -3,7 +3,7 @@ describe('OHIF Save Measurements', function() {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {

View File

@ -3,7 +3,7 @@ describe('Visual Regression - OHIF Cornerstone Hotkeys', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {

View File

@ -3,7 +3,7 @@ describe('Visual Regression - OHIF Cornerstone Toolbar', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {
@ -13,7 +13,7 @@ describe('Visual Regression - OHIF Cornerstone Toolbar', () => {
}); });
it('checks if Pan tool will move the image inside the viewport', () => { it('checks if Pan tool will move the image inside the viewport', () => {
//Click on button and vefiry if icon is active on toolbar //Click on button and verify if icon is active on toolbar
cy.get('@panBtn') cy.get('@panBtn')
.click() .click()
.then($panBtn => { .then($panBtn => {

View File

@ -3,7 +3,7 @@ describe('Visual Regression - OHIF Download Snapshot File', () => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {

View File

@ -1,3 +1,6 @@
/*
Temporarily disabling as we transition to containerized PACS for E2E tests
describe('Visual Regression - OHIF Microscopy Extension', () => { describe('Visual Regression - OHIF Microscopy Extension', () => {
before(() => { before(() => {
cy.openStudyModality('SM'); cy.openStudyModality('SM');
@ -20,3 +23,4 @@ describe('Visual Regression - OHIF Microscopy Extension', () => {
); );
}); });
}); });
*/

View File

@ -1,3 +1,6 @@
/*
Temporarily disabling as we transition to containerized PACS for E2E tests
describe('Visual Regression - OHIF PDF Extension', () => { describe('Visual Regression - OHIF PDF Extension', () => {
before(() => { before(() => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
@ -20,3 +23,4 @@ describe('Visual Regression - OHIF PDF Extension', () => {
cy.percyCanvasSnapshot('PDF Extension - Should load PDF file'); cy.percyCanvasSnapshot('PDF Extension - Should load PDF file');
}); });
}); });
*/

View File

@ -1,3 +1,6 @@
/*
Temporarily disabling as we transition to containerized PACS for E2E tests
describe('Visual Regression - OHIF VTK Extension', () => { describe('Visual Regression - OHIF VTK Extension', () => {
before(() => { before(() => {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
@ -91,3 +94,4 @@ describe('Visual Regression - OHIF VTK Extension', () => {
cy.percyCanvasSnapshot('VTK Rotate tool - Should rotate image'); cy.percyCanvasSnapshot('VTK Rotate tool - Should rotate image');
}); });
}); });
*/

View File

@ -13,7 +13,7 @@ describe('Visual Regression - OHIF Routes', function() {
); );
cy.server(); cy.server();
cy.route('GET', '**/ TESTStudy; /**').as('getTESTStudy'); cy.route('GET', '*TESTStudy; /**').as('getTESTStudy');
cy.wait('@getTESTStudy.all'); cy.wait('@getTESTStudy.all');
cy.get('@getTESTStudy').should($route => { cy.get('@getTESTStudy').should($route => {

View File

@ -3,7 +3,7 @@ describe('Visual Regression - OHIF Study Viewer Page', function() {
cy.checkStudyRouteInViewer( cy.checkStudyRouteInViewer(
'1.2.840.113619.2.5.1762583153.215519.978957063.78' '1.2.840.113619.2.5.1762583153.215519.978957063.78'
); );
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(function() { beforeEach(function() {
@ -31,6 +31,6 @@ describe('Visual Regression - OHIF Study Viewer Page', function() {
//close modal //close modal
cy.get('[data-cy="close-button"]').click(); cy.get('[data-cy="close-button"]').click();
cy.get('@aboutOverlay').should('not.be.enabled'); cy.get('@aboutOverlay').should('not.exist');
}); });
}); });

View File

@ -9,6 +9,11 @@ describe('Visual Regression - OHIF User Preferences', () => {
cy.openPreferences(); cy.openPreferences();
}); });
afterEach(() => {
// Close User Preferences modal
cy.closePreferences();
});
it('checks displayed information on User Preferences modal', function() { it('checks displayed information on User Preferences modal', function() {
// Go go hotkeys tab // Go go hotkeys tab
cy.selectPreferencesTab('@userPreferencesHotkeysTab'); cy.selectPreferencesTab('@userPreferencesHotkeysTab');
@ -52,7 +57,7 @@ describe('Visual Regression - OHIF User Preferences', () => {
context('Study Viewer Page', function() { context('Study Viewer Page', function() {
before(() => { before(() => {
cy.openStudyInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78'); cy.openStudyInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
cy.expectMinimumThumbnails(5); cy.expectMinimumThumbnails(3);
}); });
beforeEach(() => { beforeEach(() => {
@ -64,6 +69,11 @@ describe('Visual Regression - OHIF User Preferences', () => {
cy.openPreferences(); cy.openPreferences();
}); });
afterEach(() => {
// Close User Preferences modal
cy.closePreferences();
});
it('checks displayed information on User Preferences modal', function() { it('checks displayed information on User Preferences modal', function() {
// Go go hotkeys tab // Go go hotkeys tab
cy.selectPreferencesTab('@userPreferencesHotkeysTab'); cy.selectPreferencesTab('@userPreferencesHotkeysTab');
@ -150,13 +160,13 @@ describe('Visual Regression - OHIF User Preferences', () => {
// Set new hotkey for 'Next Image Viewport' function // Set new hotkey for 'Next Image Viewport' function
cy.setNewHotkeyShortcutOnUserPreferencesModal( cy.setNewHotkeyShortcutOnUserPreferencesModal(
'Next Image Viewport', 'Next Viewport',
'{shift}{rightarrow}' '{shift}{rightarrow}'
); );
// Set new hotkey for 'Previous Image Viewport' function // Set new hotkey for 'Previous Image Viewport' function
cy.setNewHotkeyShortcutOnUserPreferencesModal( cy.setNewHotkeyShortcutOnUserPreferencesModal(
'Previous Image Viewport', 'Previous Viewport',
'{shift}{leftarrow}' '{shift}{leftarrow}'
); );

View File

@ -14,20 +14,22 @@ let percyHealthCheck = require('@percy/cypress/task');
module.exports = (on, config) => { module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits // `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config // `config` is the resolved Cypress config
on('before:browser:launch', (browser = {}, args) => { on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.name === 'chrome') { if (browser.name === 'chrome') {
// `args` is an araay of all the arguments // `args` is an araay of all the arguments
// that will be passed to Chrome when it launchers // that will be passed to Chrome when it launchers
args.push('--start-fullscreen'); launchOptions.args.push('--start-fullscreen');
// whatever you return here becomes the new args // whatever you return here becomes the new args
return args; return launchOptions;
} }
if (browser.name === 'chromium') { if (browser.name === 'chromium') {
const newArgs = args.filter(arg => arg !== '--disable-gpu'); const newArgs = args.filter(arg => arg !== '--disable-gpu');
newArgs.push('--ignore-gpu-blacklist'); newArgs.push('--ignore-gpu-blacklist');
return newArgs; launchOptions.args = newArgs;
return launchOptions;
} }
}); });

View File

View File

@ -149,10 +149,11 @@ Cypress.Commands.add('addLine', (viewport, firstClick, secondClick) => {
const [x1, y1] = firstClick; const [x1, y1] = firstClick;
const [x2, y2] = secondClick; const [x2, y2] = secondClick;
// TODO: Added a wait which appears necessary in Cornerstone Tools >4?
cy.wrap($viewport) cy.wrap($viewport)
.click(x1, y1, { force: true }) .click(x1, y1).wait(100)
.trigger('mousemove', { clientX: x2, clientY: y2 }) .trigger('mousemove', { clientX: x2, clientY: y2 })
.click(x2, y2, { force: true }); .click(x2, y2).wait(100);
}); });
}); });
@ -242,6 +243,8 @@ Cypress.Commands.add('resetViewport', () => {
cy.get('[data-cy="reset"]') cy.get('[data-cy="reset"]')
.as('resetBtn') .as('resetBtn')
.click(); .click();
cy.get('.tooltip-toolbar-overlay').should('not.exist');
}); });
Cypress.Commands.add('imageZoomIn', () => { Cypress.Commands.add('imageZoomIn', () => {
@ -466,6 +469,24 @@ Cypress.Commands.add('openPreferences', () => {
}); });
}); });
Cypress.Commands.add('closePreferences', () => {
cy.log('Close User Preferences Modal');
cy.get('body').then(body => {
// Close notification if displayed
if (body.find('.sb-closeIcon').length > 0) {
cy.get('.sb-closeIcon')
.first()
.click({ force: true });
}
// Close User Preferences Modal (if displayed)
if (body.find('.OHIFModal__header').length > 0) {
cy.get('[data-cy="close-button"]').click({ force: true });
}
});
});
Cypress.Commands.add('selectPreferencesTab', tabAlias => { Cypress.Commands.add('selectPreferencesTab', tabAlias => {
cy.initPreferencesModalAliases(); cy.initPreferencesModalAliases();
cy.get(tabAlias) cy.get(tabAlias)
@ -527,8 +548,7 @@ Cypress.Commands.add(
.parent() .parent()
.find('input') // closest input to that label .find('input') // closest input to that label
.type(shortcut, { force: true }); // Set new shortcut for that function .type(shortcut, { force: true }); // Set new shortcut for that function
}) });
.blur();
} }
); );

View File

@ -1,6 +1,6 @@
{ {
"name": "@ohif/viewer", "name": "@ohif/viewer",
"version": "4.5.26", "version": "4.5.29",
"description": "OHIF Viewer", "description": "OHIF Viewer",
"author": "OHIF Contributors", "author": "OHIF Contributors",
"license": "MIT", "license": "MIT",
@ -30,6 +30,7 @@
"start": "yarn run dev", "start": "yarn run dev",
"test:e2e": "cypress open", "test:e2e": "cypress open",
"test:e2e:ci": "percy exec -- cypress run --config video=false --record --browser chrome --spec 'cypress/integration/visual-regression/**/*'", "test:e2e:ci": "percy exec -- cypress run --config video=false --record --browser chrome --spec 'cypress/integration/visual-regression/**/*'",
"test:e2e:script-tag": "cypress run --config video=false --browser chrome --spec 'cypress/integration/common/**/*,cypress/integration/script-tag/**/*'",
"test:e2e:local": "cypress run --config video=false --browser chrome --spec 'cypress/integration/common/**/*,cypress/integration/pwa/**/*'", "test:e2e:local": "cypress run --config video=false --browser chrome --spec 'cypress/integration/common/**/*,cypress/integration/pwa/**/*'",
"test:e2e:dist": "start-server-and-test test:e2e:serve http://localhost:3000 test:e2e:ci", "test:e2e:dist": "start-server-and-test test:e2e:serve http://localhost:3000 test:e2e:ci",
"test:e2e:serve": "serve -n -l 3000 -s dist", "test:e2e:serve": "serve -n -l 3000 -s dist",
@ -57,8 +58,8 @@
"@ohif/extension-dicom-rt": "^0.4.9", "@ohif/extension-dicom-rt": "^0.4.9",
"@ohif/extension-dicom-segmentation": "^0.4.7", "@ohif/extension-dicom-segmentation": "^0.4.7",
"@ohif/extension-lesion-tracker": "^0.2.1", "@ohif/extension-lesion-tracker": "^0.2.1",
"@ohif/extension-vtk": "^1.7.16", "@ohif/extension-vtk": "^1.8.0",
"@ohif/i18n": "^0.52.8", "@ohif/i18n": "^0.53.0",
"@ohif/ui": "^1.5.7", "@ohif/ui": "^1.5.7",
"@tanem/react-nprogress": "^1.1.25", "@tanem/react-nprogress": "^1.1.25",
"classnames": "^2.2.6", "classnames": "^2.2.6",
@ -92,7 +93,7 @@
"vtk.js": "^11.14.0" "vtk.js": "^11.14.0"
}, },
"devDependencies": { "devDependencies": {
"cypress": "^3.8.0", "cypress": "^6.0.0",
"gh-pages": "2.0.1", "gh-pages": "2.0.1",
"identity-obj-proxy": "3.0.x", "identity-obj-proxy": "3.0.x",
"lodash": "4.17.15", "lodash": "4.17.15",

View File

@ -0,0 +1,125 @@
window.config = {
routerBasename: '/',
extensions: [],
showStudyList: true,
servers: {
dicomWeb: [
{
name: 'dicomweb_server',
wadoUriRoot: 'http://localhost:5985',
qidoRoot: 'http://localhost:5985',
wadoRoot: 'http://localhost:5985',
qidoSupportsIncludeField: false,
imageRendering: 'wadouri',
thumbnailRendering: 'wadouri',
enableStudyLazyLoad: true,
},
],
},
// Extensions should be able to suggest default values for these?
// Or we can require that these be explicitly set
hotkeys: [
// ~ Global
{
commandName: 'incrementActiveViewport',
label: 'Next Viewport',
keys: ['right'],
},
{
commandName: 'decrementActiveViewport',
label: 'Previous Viewport',
keys: ['left'],
},
// Supported Keys: https://craig.is/killing/mice
// ~ Cornerstone Extension
{ commandName: 'rotateViewportCW', label: 'Rotate Right', keys: ['r'] },
{ commandName: 'rotateViewportCCW', label: 'Rotate Left', keys: ['l'] },
{ commandName: 'invertViewport', label: 'Invert', keys: ['i'] },
{
commandName: 'flipViewportVertical',
label: 'Flip Horizontally',
keys: ['h'],
},
{
commandName: 'flipViewportHorizontal',
label: 'Flip Vertically',
keys: ['v'],
},
{ commandName: 'scaleUpViewport', label: 'Zoom In', keys: ['+'] },
{ commandName: 'scaleDownViewport', label: 'Zoom Out', keys: ['-'] },
{ commandName: 'fitViewportToWindow', label: 'Zoom to Fit', keys: ['='] },
{ commandName: 'resetViewport', label: 'Reset', keys: ['space'] },
// clearAnnotations
{ commandName: 'nextImage', label: 'Next Image', keys: ['down'] },
{ commandName: 'previousImage', label: 'Previous Image', keys: ['up'] },
// firstImage
// lastImage
{
commandName: 'previousViewportDisplaySet',
label: 'Previous Series',
keys: ['pagedown'],
},
{
commandName: 'nextViewportDisplaySet',
label: 'Next Series',
keys: ['pageup'],
},
// ~ Cornerstone Tools
{ commandName: 'setZoomTool', label: 'Zoom', keys: ['z'] },
// ~ Window level presets
{
commandName: 'windowLevelPreset1',
label: 'W/L Preset 1',
keys: ['1'],
},
{
commandName: 'windowLevelPreset2',
label: 'W/L Preset 2',
keys: ['2'],
},
{
commandName: 'windowLevelPreset3',
label: 'W/L Preset 3',
keys: ['3'],
},
{
commandName: 'windowLevelPreset4',
label: 'W/L Preset 4',
keys: ['4'],
},
{
commandName: 'windowLevelPreset5',
label: 'W/L Preset 5',
keys: ['5'],
},
{
commandName: 'windowLevelPreset6',
label: 'W/L Preset 6',
keys: ['6'],
},
{
commandName: 'windowLevelPreset7',
label: 'W/L Preset 7',
keys: ['7'],
},
{
commandName: 'windowLevelPreset8',
label: 'W/L Preset 8',
keys: ['8'],
},
{
commandName: 'windowLevelPreset9',
label: 'W/L Preset 9',
keys: ['9'],
},
],
cornerstoneExtensionConfig: {},
// Following property limits number of simultaneous series metadata requests.
// For http/1.x-only servers, set this to 5 or less to improve
// on first meaningful display in viewer
// If the server is particularly slow to respond to series metadata
// requests as it extracts the metadata from raw files everytime,
// try setting this to even lower value
// Leave it undefined for no limit, sutiable for HTTP/2 enabled servers
// maxConcurrentMetadataRequests: 5,
};

Some files were not shown because too many files have changed in this diff Show More