ci: Added verification on Before hook to avoid navigating again to viewer page (#1505)
* Added verification on Before hook to avoid navigating again to viewer page * Removed unecessary screenshots and duplicated test cases * Navigation Fix for HTML extension and improved Flip button verification Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
This commit is contained in:
1 parent
31ba042121
commit
d9999c1ae4
18 files changed
+140
-149
No files matched your search
@@ -1,8 +1,9 @@
|
||||
describe('OHIF Cornerstone Hotkeys', () => {
|
||||
before(() => {
|
||||
cy.openStudyInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
cy.waitDicomImage();
|
||||
cy.expectMinimumThumbnails(3);
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
cy.expectMinimumThumbnails(5);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -42,13 +43,6 @@ describe('OHIF Cornerstone Hotkeys', () => {
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'P');
|
||||
});
|
||||
|
||||
it('checks if hotkey "I" can invert the image', () => {
|
||||
// Hotkey I
|
||||
cy.get('body').type('I');
|
||||
// Visual comparison
|
||||
cy.screenshot('Hotkey I - Should Invert Image');
|
||||
});
|
||||
|
||||
it('checks if hotkeys "+", "-" and "=" can zoom in, out and fit to viewport', () => {
|
||||
// Hotkey +
|
||||
cy.get('body').type('+++'); // Press hotkey 3 times
|
||||
@@ -73,9 +67,6 @@ describe('OHIF Cornerstone Hotkeys', () => {
|
||||
cy.get('@viewportInfoMidLeft').should('contains.text', 'R');
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'A');
|
||||
cy.get('@viewportInfoBottomRight').should('contains.text', 'Zoom: 211%');
|
||||
|
||||
// Visual comparison to make sure the 'inverted' image was reset
|
||||
cy.screenshot('Hotkey SPACEBAR - Should Reset Image');
|
||||
});
|
||||
|
||||
it('uses hotkeys "RightArrow" and "LeftArrow" to navigate between multiple viewports', () => {
|
||||
@@ -126,6 +117,9 @@ describe('OHIF Cornerstone Hotkeys', () => {
|
||||
cy.get('@viewport2InfoMidLeft').should('contains.text', 'A');
|
||||
cy.get('@viewport2InfoMidTop').should('contains.text', 'H');
|
||||
cy.get('@viewport2InfoBottomRight').should('contains.text', 'Zoom: 45%');
|
||||
|
||||
//Select viewport layout (1,1)
|
||||
cy.setLayout(1, 1);
|
||||
});
|
||||
|
||||
//TO-DO: This test is blocked by issue #1095 (https://github.com/OHIF/Viewers/issues/1095)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
describe('OHIF Cornerstone Toolbar', () => {
|
||||
before(() => {
|
||||
cy.openStudyInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
cy.waitDicomImage();
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
cy.expectMinimumThumbnails(5);
|
||||
});
|
||||
|
||||
@@ -116,9 +117,6 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
.trigger('mousedown', 'center', { which: 1 })
|
||||
.trigger('mousemove', 'bottom', { which: 1 })
|
||||
.trigger('mouseup', 'bottom');
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot('Pan tool moved the image inside the viewport');
|
||||
});
|
||||
|
||||
it('checks if Length annotation can be added on viewport and on measurements panel', () => {
|
||||
@@ -425,19 +423,6 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('check if Invert tool will change the colors of the image in the viewport', () => {
|
||||
// Click on More button
|
||||
cy.get('@moreBtn').click();
|
||||
// Verify if overlay is displayed
|
||||
cy.get('.tooltip-toolbar-overlay').should('be.visible');
|
||||
|
||||
// Click on Invert button
|
||||
cy.get('[data-cy="invert"]').click();
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot('Invert tool - Should Invert Canvas');
|
||||
});
|
||||
|
||||
it('check if Rotate tool will change the image orientation in the viewport', () => {
|
||||
//Click on More button
|
||||
cy.get('@moreBtn').click();
|
||||
@@ -447,10 +432,9 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
.then(() => {
|
||||
//Click on Rotate button
|
||||
cy.get('[data-cy="rotate right"]').click({ force: true });
|
||||
cy.get('@viewportInfoMidLeft').should('contains.text', 'F');
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'R');
|
||||
});
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot('Rotate tool - Should Rotate Image to Right');
|
||||
});
|
||||
|
||||
it('check if Flip H tool will flip the image horizontally in the viewport', () => {
|
||||
@@ -461,9 +445,8 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
|
||||
//Click on Flip H button
|
||||
cy.get('[data-cy="flip h"]').click();
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot('Flip H tool - Should Flip Image on Y axis');
|
||||
cy.get('@viewportInfoMidLeft').should('contains.text', 'L');
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'H');
|
||||
});
|
||||
|
||||
it('check if Flip V tool will flip the image vertically in the viewport', () => {
|
||||
@@ -474,8 +457,7 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
|
||||
//Click on Flip V button
|
||||
cy.get('[data-cy="flip v"]').click();
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot('Flip V tool - Should Flip Image on X axis');
|
||||
cy.get('@viewportInfoMidLeft').should('contains.text', 'R');
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'F');
|
||||
});
|
||||
});
|
||||
@@ -1,7 +1,8 @@
|
||||
describe('OHIF Download Snapshot File', () => {
|
||||
before(() => {
|
||||
cy.openStudyInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
cy.waitDicomImage();
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
cy.expectMinimumThumbnails(5);
|
||||
});
|
||||
|
||||
@@ -105,8 +106,6 @@ describe('OHIF Download Snapshot File', () => {
|
||||
cy.get('[data-cy="show-annotations"]').check();
|
||||
// Check image preview
|
||||
cy.get('[data-cy="image-preview"]').scrollIntoView();
|
||||
// Visual comparison
|
||||
cy.screenshot('Download Image Modal - Show Annotations checked');
|
||||
//Compare classes that exists on Image Preview with Annotations and Without Annotation
|
||||
cy.get('[data-cy="modal-content"]')
|
||||
.find('canvas')
|
||||
|
||||
@@ -2,10 +2,19 @@
|
||||
//this is intended to be running in a controled docker environment with test data.
|
||||
describe('OHIF Study List', function() {
|
||||
context('Desktop resolution', function() {
|
||||
before(function() {
|
||||
cy.openStudyList();
|
||||
});
|
||||
|
||||
beforeEach(function() {
|
||||
cy.viewport(1750, 720);
|
||||
cy.openStudyList();
|
||||
cy.initStudyListAliasesOnDesktop();
|
||||
//Clear all text fields
|
||||
cy.get('@PatientName').clear();
|
||||
cy.get('@MRN').clear();
|
||||
cy.get('@AccessionNumber').clear();
|
||||
cy.get('@StudyDescription').clear();
|
||||
cy.get('@modalities').clear();
|
||||
});
|
||||
|
||||
it('searches Patient Name with exact string', function() {
|
||||
@@ -101,10 +110,16 @@ describe('OHIF Study List', function() {
|
||||
});
|
||||
|
||||
context('Tablet resolution', function() {
|
||||
before(function() {
|
||||
cy.openStudyList();
|
||||
});
|
||||
|
||||
beforeEach(function() {
|
||||
cy.viewport(1000, 660);
|
||||
cy.openStudyList();
|
||||
cy.initStudyListAliasesOnTablet();
|
||||
//Clear all text fields
|
||||
cy.get('@patientNameOrMRN').clear();
|
||||
cy.get('@accessionModalityDescription').clear();
|
||||
});
|
||||
|
||||
it('searches Patient Name with exact string', function() {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
describe('OHIF Study Viewer Page', function() {
|
||||
before(function() {
|
||||
cy.openStudyInViewer('1.2.840.113619.2.5.1762583153.215519.978957063.78');
|
||||
cy.waitDicomImage();
|
||||
cy.expectMinimumThumbnails(6);
|
||||
before(() => {
|
||||
cy.checkStudyRouteInViewer(
|
||||
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
||||
);
|
||||
cy.expectMinimumThumbnails(5);
|
||||
});
|
||||
|
||||
beforeEach(function() {
|
||||
@@ -11,8 +12,6 @@ describe('OHIF Study Viewer Page', function() {
|
||||
});
|
||||
|
||||
it('checks if series thumbnails are being displayed', function() {
|
||||
cy.screenshot('Series Thumbnails - Should Display Thumbnails');
|
||||
|
||||
cy.get('[data-cy="thumbnail-list"]')
|
||||
.its('length')
|
||||
.should('be.gt', 1);
|
||||
@@ -291,9 +290,6 @@ describe('OHIF Study Viewer Page', function() {
|
||||
});
|
||||
});
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot('About modal - Should display modal');
|
||||
|
||||
//close modal
|
||||
cy.get('[data-cy="close-button"]').click();
|
||||
cy.get('@aboutOverlay').should('not.be.enabled');
|
||||
|
||||
@@ -22,10 +22,6 @@ describe('OHIF User Preferences', () => {
|
||||
cy.get('@cancelBtn').should('have.text', 'Cancel');
|
||||
cy.get('@saveBtn').should('have.text', 'Save');
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot(
|
||||
'User Preferences Modal - Hotkeys tab initial state in Study List page'
|
||||
);
|
||||
cy.get('[data-cy="close-button"]').click();
|
||||
});
|
||||
|
||||
@@ -36,10 +32,6 @@ describe('OHIF User Preferences', () => {
|
||||
// Language dropdown should be displayed
|
||||
cy.get('#language-select').should('be.visible');
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot(
|
||||
'User Preferences Modal - General tab initial state in Study List page'
|
||||
);
|
||||
// Set language to Spanish and save
|
||||
cy.setLanguage('Spanish');
|
||||
|
||||
@@ -211,10 +203,6 @@ describe('OHIF User Preferences', () => {
|
||||
cy.get('@cancelBtn').should('have.text', 'Cancel');
|
||||
cy.get('@saveBtn').should('have.text', 'Save');
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot(
|
||||
'User Preferences Modal - Hotkeys tab initial state in Study Viewer page'
|
||||
);
|
||||
cy.get('[data-cy="close-button"]').click(); //close User Preferences modal
|
||||
});
|
||||
|
||||
@@ -225,10 +213,6 @@ describe('OHIF User Preferences', () => {
|
||||
// Language dropdown should be displayed
|
||||
cy.get('#language-select').should('be.visible');
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot(
|
||||
'User Preferences Modal - General tab initial state in Study Viewer page'
|
||||
);
|
||||
// Set language to Spanish
|
||||
cy.setLanguage('Spanish');
|
||||
|
||||
@@ -401,9 +385,6 @@ describe('OHIF User Preferences', () => {
|
||||
cy.get('body').type(' ');
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'A');
|
||||
|
||||
// Visual comparison
|
||||
cy.screenshot('Viewport Navigation - 2nd viewport inverted and rotated');
|
||||
|
||||
// Set 1 viewport layout
|
||||
cy.setLayout(1, 1);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user