feat(segmentation mode): Add create, and export SEG with Brushes (#3632)
This commit is contained in:
1 parent
896866e9d0
commit
48bbd6281a
186 files changed
+6801
-2883
No files matched your search
@@ -7,6 +7,7 @@ describe('OHIF Multi Study', () => {
|
||||
cy.expectMinimumThumbnails(4);
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.initCommonElementsAliases();
|
||||
cy.waitDicomImage();
|
||||
};
|
||||
|
||||
it('Should display 2 comparison up', () => {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
describe('OHIF PDF Display', function () {
|
||||
beforeEach(function () {
|
||||
cy.openStudyInViewer('2.25.317377619501274872606137091638706705333');
|
||||
|
||||
cy.resetViewport().wait(50);
|
||||
});
|
||||
|
||||
it('checks if series thumbnails are being displayed', function () {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
describe('OHIF Video Display', function () {
|
||||
beforeEach(function () {
|
||||
cy.openStudyInViewer('2.25.96975534054447904995905761963464388233');
|
||||
cy.resetViewport().wait(50);
|
||||
});
|
||||
|
||||
it('checks if series thumbnails are being displayed', function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
describe('OHIF HP', () => {
|
||||
const beforeSetup = () => {
|
||||
beforeEach(() => {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1',
|
||||
'&hangingProtocolId=@ohif/mnGrid'
|
||||
@@ -7,17 +7,14 @@ describe('OHIF HP', () => {
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.initCommonElementsAliases();
|
||||
};
|
||||
cy.waitDicomImage();
|
||||
});
|
||||
|
||||
it('Should display 3 up', () => {
|
||||
beforeSetup();
|
||||
|
||||
cy.get('[data-cy="viewport-pane"]').its('length').should('be.eq', 3);
|
||||
});
|
||||
|
||||
it('Should navigate next/previous stage', () => {
|
||||
beforeSetup();
|
||||
|
||||
cy.get('body').type(',');
|
||||
cy.wait(250);
|
||||
cy.get('[data-cy="viewport-pane"]').its('length').should('be.eq', 4);
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ describe('OHIF Context Menu', function () {
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCommonElementsAliases();
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.resetViewport().wait(50);
|
||||
cy.waitDicomImage();
|
||||
});
|
||||
|
||||
it('checks context menu customization', function () {
|
||||
|
||||
+1
-1
@@ -13,10 +13,10 @@ describe('OHIF Cornerstone Hotkeys', () => {
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.initCommonElementsAliases();
|
||||
cy.waitDicomImage();
|
||||
});
|
||||
|
||||
it('checks if hotkeys "R" and "L" can rotate the image', () => {
|
||||
// Hotkey R
|
||||
cy.get('body').type('R');
|
||||
cy.get('@viewportInfoMidLeft').should('contains.text', 'P');
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'R');
|
||||
|
||||
+16
-13
@@ -9,6 +9,7 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
|
||||
//const expectedText = 'Ser: 1';
|
||||
//cy.get('@viewportInfoBottomLeft').should('contains.text', expectedText);
|
||||
cy.waitDicomImage();
|
||||
});
|
||||
|
||||
it('checks if all primary buttons are being displayed', () => {
|
||||
@@ -66,13 +67,12 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
// });
|
||||
|
||||
it('checks if Levels tool will change the window width and center of an image', () => {
|
||||
//Click on button and verify if icon is active on toolbar
|
||||
cy.waitDicomImage();
|
||||
cy.get('@wwwcBtnPrimary')
|
||||
.click()
|
||||
.then($wwwcBtn => {
|
||||
cy.wrap($wwwcBtn).should('have.class', 'active');
|
||||
});
|
||||
// Wait for the DICOM image to load
|
||||
|
||||
// Assign an alias to the button element
|
||||
cy.get('@wwwcBtnPrimary').as('wwwcButton');
|
||||
cy.get('@wwwcButton').click();
|
||||
cy.get('@wwwcButton').should('have.class', 'active');
|
||||
|
||||
//drags the mouse inside the viewport to be able to interact with series
|
||||
cy.get('@viewport')
|
||||
@@ -90,13 +90,16 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
});
|
||||
|
||||
it('checks if Pan tool will move the image inside the viewport', () => {
|
||||
//Click on button and verify if icon is active on toolbar
|
||||
cy.get('@panBtn')
|
||||
.click()
|
||||
.then($panBtn => {
|
||||
cy.wrap($panBtn).should('have.class', 'active');
|
||||
});
|
||||
// Assign an alias to the button element
|
||||
cy.get('@panBtn').as('panButton');
|
||||
|
||||
// Click on the button
|
||||
cy.get('@panButton').click();
|
||||
|
||||
// Assert that the button has the 'active' class
|
||||
cy.get('@panButton').should('have.class', 'active');
|
||||
|
||||
// Trigger the pan actions on the viewport
|
||||
cy.get('@viewport')
|
||||
.trigger('mousedown', 'center', { buttons: 1 })
|
||||
.trigger('mousemove', 'bottom', { buttons: 1 })
|
||||
|
||||
@@ -5,7 +5,6 @@ describe('OHIF Measurement Panel', function () {
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCommonElementsAliases();
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.resetViewport().wait(50);
|
||||
cy.waitDicomImage();
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ describe('OHIF Study Viewer Page', function () {
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.initCommonElementsAliases();
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.resetViewport().wait(50);
|
||||
});
|
||||
|
||||
it('checks if series thumbnails are being displayed', function () {
|
||||
|
||||
@@ -144,18 +144,19 @@ Cypress.Commands.add('drag', { prevSubject: 'element' }, (...args) =>
|
||||
* @param {number[]} secondClick - Click position [x, y]
|
||||
*/
|
||||
Cypress.Commands.add('addLine', (viewport, firstClick, secondClick) => {
|
||||
cy.get(viewport).then($viewport => {
|
||||
const [x1, y1] = firstClick;
|
||||
const [x2, y2] = secondClick;
|
||||
cy.get(viewport).as('viewportAlias');
|
||||
const [x1, y1] = firstClick;
|
||||
const [x2, y2] = secondClick;
|
||||
|
||||
// The wait is necessary because of double click testing
|
||||
cy.wrap($viewport)
|
||||
.click(x1, y1)
|
||||
.wait(250)
|
||||
.trigger('mousemove', { clientX: x2, clientY: y2 })
|
||||
.click(x2, y2)
|
||||
.wait(250);
|
||||
});
|
||||
// First click
|
||||
cy.get('@viewportAlias').click(x1, y1, { force: true, multiple: true }).wait(250);
|
||||
|
||||
// Move the mouse and then click again
|
||||
cy.get('@viewportAlias')
|
||||
.trigger('mousemove', { clientX: x2, clientY: y2 })
|
||||
.get('@viewportAlias')
|
||||
.click(x2, y2, { force: true, multiple: true })
|
||||
.wait(250);
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -183,8 +184,10 @@ Cypress.Commands.add('addAngle', (viewport, firstClick, secondClick, thirdClick)
|
||||
});
|
||||
|
||||
Cypress.Commands.add('expectMinimumThumbnails', (seriesToWait = 1) => {
|
||||
cy.get('[data-cy="study-browser-thumbnail"]', { timeout: 50000 }).should($itemList => {
|
||||
expect($itemList.length >= seriesToWait).to.be.true;
|
||||
cy.get('[data-cy="study-browser-thumbnail"]', { timeout: 50000 }).as('thumbnails');
|
||||
|
||||
cy.get('@thumbnails').should($itemList => {
|
||||
expect($itemList.length).to.be.gte(seriesToWait);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -211,11 +214,13 @@ Cypress.Commands.add('waitDicomImage', (mode = '/basic-test', timeout = 50000) =
|
||||
|
||||
//Command to reset and clear all the changes made to the viewport
|
||||
Cypress.Commands.add('resetViewport', () => {
|
||||
//Click on More button
|
||||
// Assign an alias to the More button
|
||||
cy.get('[data-cy="MoreTools-split-button-primary"]')
|
||||
.should('have.attr', 'data-tool', 'Reset')
|
||||
.as('moreBtn')
|
||||
.click();
|
||||
.as('moreBtn');
|
||||
|
||||
// Use the alias to click on the More button
|
||||
cy.get('@moreBtn').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('imageZoomIn', () => {
|
||||
@@ -266,12 +271,13 @@ Cypress.Commands.add('initStudyListAliasesOnDesktop', () => {
|
||||
Cypress.Commands.add(
|
||||
'addLengthMeasurement',
|
||||
(firstClick = [150, 100], secondClick = [130, 170]) => {
|
||||
cy.get('@measurementToolsBtnPrimary')
|
||||
.should('have.attr', 'data-tool', 'Length')
|
||||
.click()
|
||||
.then($lengthBtn => {
|
||||
cy.wrap($lengthBtn).should('have.class', 'active');
|
||||
});
|
||||
// Assign an alias to the button element
|
||||
cy.get('@measurementToolsBtnPrimary').as('lengthButton');
|
||||
|
||||
cy.get('@lengthButton').should('have.attr', 'data-tool', 'Length');
|
||||
cy.get('@lengthButton').click();
|
||||
|
||||
cy.get('@lengthButton').should('have.class', 'active');
|
||||
|
||||
cy.addLine('.viewport-element', firstClick, secondClick);
|
||||
}
|
||||
@@ -463,7 +469,11 @@ Cypress.Commands.add('closePreferences', () => {
|
||||
|
||||
Cypress.Commands.add('selectPreferencesTab', tabAlias => {
|
||||
cy.initPreferencesModalAliases();
|
||||
cy.get(tabAlias).click().should('have.class', 'active');
|
||||
|
||||
cy.get(tabAlias).as('selectedTab');
|
||||
cy.get('@selectedTab').click();
|
||||
cy.get('@selectedTab').should('have.class', 'active');
|
||||
|
||||
initPreferencesModalFooterBtnAliases();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user