tests: Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description (#1014)
* Fix for test scripts that were failing in CI
* Test cases for tools: Length and Angle
* Test cases implemented: Scroll series, Levels, Pan, Reset, Zoom
* Added test cases for tools: Cine, More, Layout, Invert, Rotate, FlipH, FlipV
* Fixes made according to comments on PR review
* Fixes for failing scenarios: Layout and Cine
* Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description
* Fix for CI failure
2019-10-10 21:46:41 +02:00
|
|
|
//Creating aliases for Cornerstone tools buttons
|
|
|
|
|
export function initCornerstoneToolsAliases() {
|
2019-12-20 20:07:00 +01:00
|
|
|
cy.get('[data-cy="stack scroll"]').as('stackScrollBtn');
|
|
|
|
|
cy.get('[data-cy="zoom"]').as('zoomBtn');
|
|
|
|
|
cy.get('[data-cy="levels"]').as('levelsBtn');
|
|
|
|
|
cy.get('[data-cy="pan"]').as('panBtn');
|
|
|
|
|
cy.get('[data-cy="length"]').as('lengthBtn');
|
|
|
|
|
cy.get('[data-cy="annotate"]').as('annotateBtn');
|
|
|
|
|
cy.get('[data-cy="angle"]').as('angleBtn');
|
|
|
|
|
cy.get('[data-cy="reset"]').as('resetBtn');
|
|
|
|
|
cy.get('[data-cy="cine"]').as('cineBtn');
|
|
|
|
|
cy.get('[data-cy="more"]').as('moreBtn');
|
|
|
|
|
cy.get('[data-cy="layout"]').as('layoutBtn');
|
2019-12-11 17:46:10 +01:00
|
|
|
cy.get('.viewport-element').as('viewport');
|
tests: Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description (#1014)
* Fix for test scripts that were failing in CI
* Test cases for tools: Length and Angle
* Test cases implemented: Scroll series, Levels, Pan, Reset, Zoom
* Added test cases for tools: Cine, More, Layout, Invert, Rotate, FlipH, FlipV
* Fixes made according to comments on PR review
* Fixes for failing scenarios: Layout and Cine
* Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description
* Fix for CI failure
2019-10-10 21:46:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Creating aliases for Common page elements
|
|
|
|
|
export function initCommonElementsAliases() {
|
|
|
|
|
cy.get(
|
2020-03-13 20:45:26 +01:00
|
|
|
'.pull-right > .RoundedButtonGroup > .roundedButtonWrapper:first-of-type > .roundedButton'
|
tests: Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description (#1014)
* Fix for test scripts that were failing in CI
* Test cases for tools: Length and Angle
* Test cases implemented: Scroll series, Levels, Pan, Reset, Zoom
* Added test cases for tools: Cine, More, Layout, Invert, Rotate, FlipH, FlipV
* Fixes made according to comments on PR review
* Fixes for failing scenarios: Layout and Cine
* Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description
* Fix for CI failure
2019-10-10 21:46:41 +02:00
|
|
|
).as('measurementsBtn');
|
|
|
|
|
cy.get('.viewport-element').as('viewport');
|
|
|
|
|
cy.get('section.sidepanel.from-right').as('measurementsPanel');
|
|
|
|
|
cy.get(
|
|
|
|
|
'.pull-left > .RoundedButtonGroup > .roundedButtonWrapper > .roundedButton'
|
|
|
|
|
).as('seriesBtn');
|
|
|
|
|
cy.get('section.sidepanel.from-left').as('seriesPanel');
|
|
|
|
|
cy.get('div.ViewportOverlay > div.bottom-left.overlay-element > div').as(
|
|
|
|
|
'viewportInfoBottomLeft'
|
|
|
|
|
);
|
|
|
|
|
cy.get('div.ViewportOverlay > div.bottom-right.overlay-element > div').as(
|
|
|
|
|
'viewportInfoBottomRight'
|
|
|
|
|
);
|
2019-10-26 13:12:03 +02:00
|
|
|
cy.get('.left-mid.orientation-marker').as('viewportInfoMidLeft');
|
|
|
|
|
cy.get('.top-mid.orientation-marker').as('viewportInfoMidTop');
|
tests: Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description (#1014)
* Fix for test scripts that were failing in CI
* Test cases for tools: Length and Angle
* Test cases implemented: Scroll series, Levels, Pan, Reset, Zoom
* Added test cases for tools: Cine, More, Layout, Invert, Rotate, FlipH, FlipV
* Fixes made according to comments on PR review
* Fixes for failing scenarios: Layout and Cine
* Test cases implemented: Cornerstone tools Clear and Eraser; Measurement panel Relabel and Description
* Fix for CI failure
2019-10-10 21:46:41 +02:00
|
|
|
}
|
2019-10-16 17:39:41 +02:00
|
|
|
|
|
|
|
|
//Creating aliases for Routes
|
|
|
|
|
export function initRouteAliases() {
|
|
|
|
|
cy.server();
|
2019-10-22 20:40:23 +02:00
|
|
|
cy.route('GET', '**/series**').as('getStudySeries');
|
|
|
|
|
cy.route('GET', '**/studies**').as('getStudies');
|
2019-10-16 17:39:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Creating aliases for VTK tools buttons
|
|
|
|
|
export function initVTKToolsAliases() {
|
2019-12-20 21:59:36 +01:00
|
|
|
cy.get('[data-cy="exit 2d mpr"]').as('exit2dmprBtn');
|
2019-12-20 20:07:00 +01:00
|
|
|
cy.get('[data-cy="crosshairs"]').as('crosshairsBtn');
|
|
|
|
|
cy.get('[data-cy="wwwc"]').as('wwwcBtn');
|
|
|
|
|
cy.get('[data-cy="rotate"]').as('rotateBtn');
|
2019-10-16 17:39:41 +02:00
|
|
|
cy.get('.slab-thickness').as('slabSlider');
|
|
|
|
|
cy.get('.select-ohif').as('modeDropdown');
|
|
|
|
|
cy.get('.ohif-check-label').as('modeCheckbox');
|
2019-12-20 20:07:00 +01:00
|
|
|
cy.get('[data-cy="layout"]').as('layoutBtn');
|
2019-10-16 17:39:41 +02:00
|
|
|
}
|
2019-11-06 05:46:38 +01:00
|
|
|
|
|
|
|
|
//Creating aliases for Study List page elements on Desktop experience
|
|
|
|
|
export function initStudyListAliasesOnDesktop() {
|
|
|
|
|
cy.get('.study-count').as('studyCount');
|
2020-03-09 20:03:23 +01:00
|
|
|
cy.get('#filter-PatientName').as('PatientName');
|
|
|
|
|
cy.get('#filter-PatientID').as('MRN');
|
|
|
|
|
cy.get('#filter-AccessionNumber').as('AccessionNumber');
|
2019-11-06 05:46:38 +01:00
|
|
|
cy.get('#start-date').as('studyListStartDate');
|
|
|
|
|
cy.get('#end-date').as('studyListEndDate');
|
|
|
|
|
cy.get('#filter-modalities').as('modalities');
|
2020-03-09 20:03:23 +01:00
|
|
|
cy.get('#filter-StudyDescription').as('StudyDescription');
|
2019-11-06 05:46:38 +01:00
|
|
|
cy.get('[data-cy="study-list-results"] > tr').as('searchResult');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Creating aliases for Study List page elements on Tablet experience
|
|
|
|
|
export function initStudyListAliasesOnTablet() {
|
|
|
|
|
cy.get('.study-count').as('studyCount');
|
|
|
|
|
cy.get('#filter-patientNameOrId').as('patientNameOrMRN');
|
|
|
|
|
cy.get('#filter-accessionOrModalityOrDescription').as(
|
|
|
|
|
'accessionModalityDescription'
|
|
|
|
|
);
|
|
|
|
|
cy.get('#start-date').as('studyListStartDate');
|
|
|
|
|
cy.get('#end-date').as('studyListEndDate');
|
|
|
|
|
cy.get('[data-cy="study-list-results"] > tr').as('searchResult');
|
|
|
|
|
}
|
2019-11-20 20:15:10 +01:00
|
|
|
|
|
|
|
|
//Creating aliases for User Preferences modal
|
|
|
|
|
export function initPreferencesModalAliases() {
|
|
|
|
|
cy.get('.OHIFModal').as('preferencesModal');
|
2019-12-20 20:07:00 +01:00
|
|
|
cy.get('[data-cy="hotkeys"]').as('userPreferencesHotkeysTab');
|
|
|
|
|
cy.get('[data-cy="general"]').as('userPreferencesGeneralTab');
|
2020-03-26 02:46:28 +01:00
|
|
|
cy.get('[data-cy="window-level"]').as('userPreferencesWindowLevelTab');
|
2020-02-12 21:35:04 +01:00
|
|
|
initPreferencesModalFooterBtnAliases();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Creating aliases for User Preferences modal
|
|
|
|
|
export function initPreferencesModalFooterBtnAliases() {
|
|
|
|
|
cy.get('.active [data-cy="reset-default-btn"]').as('restoreBtn');
|
|
|
|
|
cy.get('.active [data-cy="cancel-btn"]').as('cancelBtn');
|
|
|
|
|
cy.get('.active [data-cy="save-btn"]').as('saveBtn');
|
2019-11-20 20:15:10 +01:00
|
|
|
}
|