ohif-viewer/platform/viewer/cypress/integration/customization/HangingProtocol.spec.js
Bill Wallace c508a2b6bc
feat: Add a new hanging protocol @ohif/mn (#3305)
* feat: Add a new hanging protocol @ohif/mn

* Add @ohif/seg example

* PR comments and a couple more fixes to make things cleaner

* PR comment

* Added an example to cause the PR checks to rerun
2023-04-18 11:55:25 -04:00

51 lines
1.5 KiB
JavaScript

describe('OHIF HP', () => {
const beforeSetup = () => {
cy.checkStudyRouteInViewer(
'1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1',
'&hangingProtocolId=@ohif/mnGrid'
);
cy.expectMinimumThumbnails(3);
cy.initCornerstoneToolsAliases();
cy.initCommonElementsAliases();
};
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);
cy.get('body').type('..');
cy.wait(250);
cy.get('[data-cy="viewport-pane"]')
.its('length')
.should('be.eq', 2);
});
it('Should navigate to display set specified', () => {
// This filters by series instance UID, meaning there will only be 1 thumbnail
// It applies the initial SOP instance, navigating to that image
cy.checkStudyRouteInViewer(
'1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1',
'&SeriesInstanceUID=1.3.6.1.4.1.25403.345050719074.3824.20170125113545.4&initialSopInstanceUID=1.3.6.1.4.1.25403.345050719074.3824.20170125113546.1'
);
cy.expectMinimumThumbnails(1);
cy.initCornerstoneToolsAliases();
cy.initCommonElementsAliases();
// The specified series/sop UID's are index 101, so ensure that image is displayed
cy.get('@viewportInfoTopRight').should('contains.text', 'I:6');
});
});