From 388fe04e09ca577d9c3ca75f704c2584d7a8c488 Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Mon, 23 Dec 2019 23:10:55 -0300 Subject: [PATCH 01/13] E2E test: Percy visua regression improvements --- .../pwa/OHIFExtensionMicroscopy.spec.js | 3 - .../integration/pwa/OHIFExtensionPDF.spec.js | 1 - .../integration/pwa/OHIFExtensionVTK.spec.js | 8 -- .../PercyCheckOHIFExtensionMicroscopy.spec.js | 23 +++++ .../PercyCheckOHIFExtensionPDF.spec.js | 21 +++++ .../PercyCheckOHIFExtensionVTK.spec.js | 94 +++++++++++++++++++ 6 files changed, 138 insertions(+), 12 deletions(-) create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js diff --git a/platform/viewer/cypress/integration/pwa/OHIFExtensionMicroscopy.spec.js b/platform/viewer/cypress/integration/pwa/OHIFExtensionMicroscopy.spec.js index e33064a1b..5e0ac5386 100644 --- a/platform/viewer/cypress/integration/pwa/OHIFExtensionMicroscopy.spec.js +++ b/platform/viewer/cypress/integration/pwa/OHIFExtensionMicroscopy.spec.js @@ -23,8 +23,5 @@ describe('OHIF Microscopy Extension', () => { cy.wait(3000); //Waiting for image to render before taking the snapshot // Visual comparison cy.screenshot('Microscopy Extension - Should display loaded canvas'); - cy.percyCanvasSnapshot( - 'Microscopy Extension - Should display loaded canvas' - ); }); }); diff --git a/platform/viewer/cypress/integration/pwa/OHIFExtensionPDF.spec.js b/platform/viewer/cypress/integration/pwa/OHIFExtensionPDF.spec.js index 3a7a7b7b8..9c4658a9c 100644 --- a/platform/viewer/cypress/integration/pwa/OHIFExtensionPDF.spec.js +++ b/platform/viewer/cypress/integration/pwa/OHIFExtensionPDF.spec.js @@ -23,6 +23,5 @@ describe('OHIF PDF Extension', () => { // This won't work unless we switch to an extension that renders using `canvas` // Currently, we rely on the browser's built-in implementation cy.screenshot('PDF Extension - Should load PDF file'); - cy.percyCanvasSnapshot('PDF Extension - Should load PDF file'); }); }); diff --git a/platform/viewer/cypress/integration/pwa/OHIFExtensionVTK.spec.js b/platform/viewer/cypress/integration/pwa/OHIFExtensionVTK.spec.js index 595c4eb90..bf50c8837 100644 --- a/platform/viewer/cypress/integration/pwa/OHIFExtensionVTK.spec.js +++ b/platform/viewer/cypress/integration/pwa/OHIFExtensionVTK.spec.js @@ -57,9 +57,6 @@ describe('OHIF VTK Extension', () => { // Visual comparison cy.screenshot('VTK initial state - Should display toolbar and 3 viewports'); - cy.percyCanvasSnapshot( - 'VTK initial state - Should display toolbar and 3 viewports' - ); }); it('checks Crosshairs tool', () => { @@ -75,9 +72,6 @@ describe('OHIF VTK Extension', () => { cy.screenshot( "VTK Crosshairs tool - Should display crosshairs' green lines" ); - cy.percyCanvasSnapshot( - "VTK Crosshairs tool - Should display crosshairs' green lines" - ); }); /* TODO: Non-deterministic behavior (const expectedText = 'W: 350 L: -1044';) @@ -101,7 +95,6 @@ describe('OHIF VTK Extension', () => { // Visual comparison cy.screenshot('VTK WWWC tool - Canvas should be bright'); - cy.percyCanvasSnapshot('VTK WWWC tool - Canvas should be bright'); }); */ it('checks Rotate tool', () => { @@ -117,6 +110,5 @@ describe('OHIF VTK Extension', () => { // Visual comparison cy.screenshot('VTK Rotate tool - Should rotate image'); - cy.percyCanvasSnapshot('VTK Rotate tool - Should rotate image'); }); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js new file mode 100644 index 000000000..5586a5d99 --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js @@ -0,0 +1,23 @@ +describe('Visual Regression - OHIF Microscopy Extension', () => { + before(() => { + cy.openStudyModality('SM'); + cy.expectMinimumThumbnails(6); + }); + + it('drags and drop a SM thumbnail into viewport', () => { + cy.get('[data-cy="thumbnail-list"]') + .contains('SM') + .drag('.viewport-drop-target'); + + cy.get('.DicomMicroscopyViewer') + .its('length') + .should('be.eq', 1); + + cy.wait(3000); //Waiting for image to render before taking the snapshot + // Visual comparison + cy.screenshot('Microscopy Extension - Should display loaded canvas'); + cy.percyCanvasSnapshot( + 'Microscopy Extension - Should display loaded canvas' + ); + }); +}); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js new file mode 100644 index 000000000..da286d9b3 --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js @@ -0,0 +1,21 @@ +describe('Visual Regression - OHIF PDF Extension', () => { + before(() => { + cy.openStudy('Dummy'); + cy.expectMinimumThumbnails(6); + }); + + it('drags and drop a PDF thumbnail into viewport', () => { + cy.get('[data-cy="thumbnail-list"]') + .contains('DOC') + .drag('.viewport-drop-target'); + + cy.get('.DicomPDFViewport') + .its('length') + .should('be.eq', 1); + + // This won't work unless we switch to an extension that renders using `canvas` + // Currently, we rely on the browser's built-in implementation + cy.screenshot('PDF Extension - Should load PDF file'); + cy.percyCanvasSnapshot('PDF Extension - Should load PDF file'); + }); +}); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js new file mode 100644 index 000000000..c353c02ba --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js @@ -0,0 +1,94 @@ +describe('Visual Regression - OHIF VTK Extension', () => { + before(() => { + cy.openStudy('Juno'); + cy.waitDicomImage(); + cy.expectMinimumThumbnails(7); + }); + + beforeEach(() => { + //TODO: Due to percy snapshot, the images inside the viewports are being resized + //and once the browser continues the test execution, the images are not centered in the viewport. + //To fix that, we need to reload the page before each test. + //https://github.com/OHIF/Viewers/issues/1168 + cy.reload(); + + //Waiting for the desired thumbnail content to be displayed + cy.get('[data-cy="thumbnail-list"]').should($list => { + expect($list).to.contain('CT WB 5.0 B35f'); + }); + + // TODO: We shouldn't have to drag the thumbnail + // This is a known bug; 2D MPR button does not show until viewport + // has data from a drag-n-drop + // Drag and drop third thumbnail into first viewport + cy.get('[data-cy="thumbnail-list"]') + .contains('CT WB 5.0 B35f') + .drag('.viewport-drop-target'); + + //Select 2D MPR button + cy.get('[data-cy="2d mpr"]').click(); + + //Wait Reformatting Images + cy.waitVTKReformatting(); + + cy.initVTKToolsAliases(); + }); + + it('checks if VTK buttons are displayed on the toolbar', () => { + // Visual comparison + cy.screenshot('VTK initial state - Should display toolbar and 3 viewports'); + cy.percyCanvasSnapshot( + 'VTK initial state - Should display toolbar and 3 viewports' + ); + }); + + it('checks Crosshairs tool', () => { + cy.get('@crosshairsBtn').click(); + + // Click and Move the mouse inside the viewport + cy.get('[data-cy="viewport-container-0"]') + .trigger('mousedown', 'center', { which: 1 }) + .trigger('mousemove', 'top', { which: 1 }) + .trigger('mouseup'); + + // Visual comparison + cy.screenshot( + "VTK Crosshairs tool - Should display crosshairs' green lines" + ); + cy.percyCanvasSnapshot( + "VTK Crosshairs tool - Should display crosshairs' green lines" + ); + }); + + it('checks WWWC tool', () => { + cy.get('@wwwcBtn').click(); + + // Click and Move the mouse inside the viewport + cy.get('[data-cy="viewport-container-0"]') + .trigger('mousedown', 'center', { which: 1 }) + .trigger('mousemove', 'top', { which: 1 }) + .trigger('mousedown', 'center', { which: 1 }) + .trigger('mousemove', 'top', { which: 1 }) + .trigger('mouseup', { which: 1 }); + + // Visual comparison + cy.screenshot('VTK WWWC tool - Canvas should be bright'); + cy.percyCanvasSnapshot('VTK WWWC tool - Canvas should be bright'); + }); + + it('checks Rotate tool', () => { + cy.get('@rotateBtn').click(); + + // Click and Move the mouse inside the viewport + cy.get('[data-cy="viewport-container-0"]') + .trigger('mousedown', 'center', { which: 1 }) + .trigger('mousemove', 'top', { which: 1 }) + .trigger('mousedown', 'center', { which: 1 }) + .trigger('mousemove', 'top', { which: 1 }) + .trigger('mouseup', { which: 1 }); + + // Visual comparison + cy.screenshot('VTK Rotate tool - Should rotate image'); + cy.percyCanvasSnapshot('VTK Rotate tool - Should rotate image'); + }); +}); From 4ee2b135a7257e4ebf4dc42ada0a59432f30c27e Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Tue, 24 Dec 2019 01:17:02 -0300 Subject: [PATCH 02/13] Added more tests and updated CI config.yml --- .circleci/config.yml | 2 + .../common/OHIFCornerstoneHotkeys.spec.js | 2 - .../common/OHIFCornerstoneToolbar.spec.js | 5 - .../common/OHIFDownloadSnapshotFile.spec.js | 3 - .../integration/common/OHIFRoutes.spec.js | 7 +- .../common/OHIFStandaloneViewer.spec.js | 3 - .../integration/common/OHIFStudyList.spec.js | 38 ++-- .../common/OHIFStudyViewer.spec.js | 2 - .../common/OHIFUserPreferences.spec.js | 65 ++---- .../PercyCheckOHIFCornerstoneHotkeys.spec.js | 33 +++ .../PercyCheckOHIFCornerstoneToolbar.spec.js | 89 ++++++++ ...PercyCheckOHIFDownloadSnapshotFile.spec.js | 53 +++++ .../PercyCheckOHIFRoutes.spec.js | 24 ++ .../PercyCheckOHIFStudyViewer.spec.js | 37 +++ .../PercyCheckOHIFUserPreferences.spec.js | 210 ++++++++++++++++++ 15 files changed, 488 insertions(+), 85 deletions(-) create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js create mode 100644 platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b58d997c..258b6fdc8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -382,6 +382,7 @@ workflows: build: npx cross-env QUICK_BUILD=true yarn run build # start server --> verify running --> percy + chrome + cypress command: yarn run test:e2e:dist + spec: 'cypress/integration/visual-regression/**/*' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace post-steps: @@ -459,6 +460,7 @@ workflows: build: npx cross-env QUICK_BUILD=true yarn run build # start server --> verify running --> percy + chrome + cypress command: yarn run test:e2e:dist + spec: 'cypress/integration/visual-regression/**/*' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace post-steps: diff --git a/platform/viewer/cypress/integration/common/OHIFCornerstoneHotkeys.spec.js b/platform/viewer/cypress/integration/common/OHIFCornerstoneHotkeys.spec.js index fc67063e7..a6ecc2725 100644 --- a/platform/viewer/cypress/integration/common/OHIFCornerstoneHotkeys.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFCornerstoneHotkeys.spec.js @@ -47,7 +47,6 @@ describe('OHIF Cornerstone Hotkeys', () => { cy.get('body').type('I'); // Visual comparison cy.screenshot('Hotkey I - Should Invert Image'); - cy.percyCanvasSnapshot('Hotkey I - Should Invert Image'); }); it('checks if hotkeys "+", "-" and "=" can zoom in, out and fit to viewport', () => { @@ -77,7 +76,6 @@ describe('OHIF Cornerstone Hotkeys', () => { // Visual comparison to make sure the 'inverted' image was reset cy.screenshot('Hotkey SPACEBAR - Should Reset Image'); - cy.percyCanvasSnapshot('Hotkey SPACEBAR - Should Reset Image'); }); it('uses hotkeys "RightArrow" and "LeftArrow" to navigate between multiple viewports', () => { diff --git a/platform/viewer/cypress/integration/common/OHIFCornerstoneToolbar.spec.js b/platform/viewer/cypress/integration/common/OHIFCornerstoneToolbar.spec.js index 95ffd5d43..b4c624a08 100644 --- a/platform/viewer/cypress/integration/common/OHIFCornerstoneToolbar.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFCornerstoneToolbar.spec.js @@ -119,7 +119,6 @@ describe('OHIF Cornerstone Toolbar', () => { // Visual comparison cy.screenshot('Pan tool moved the image inside the viewport'); - cy.percyCanvasSnapshot('Pan tool moved the image inside the viewport'); }); it('checks if Length annotation can be added on viewport and on measurements panel', () => { @@ -471,7 +470,6 @@ describe('OHIF Cornerstone Toolbar', () => { // Visual comparison cy.screenshot('Invert tool - Should Invert Canvas'); - cy.percyCanvasSnapshot('Invert tool - Should Invert Canvas'); }); it('check if Rotate tool will change the image orientation in the viewport', () => { @@ -487,7 +485,6 @@ describe('OHIF Cornerstone Toolbar', () => { // Visual comparison cy.screenshot('Rotate tool - Should Rotate Image to Right'); - cy.percyCanvasSnapshot('Rotate tool - Should Rotate Image to Right'); }); it('check if Flip H tool will flip the image horizontally in the viewport', () => { @@ -501,7 +498,6 @@ describe('OHIF Cornerstone Toolbar', () => { // Visual comparison cy.screenshot('Flip H tool - Should Flip Image on Y axis'); - cy.percyCanvasSnapshot('Flip H tool - Should Flip Image on Y axis'); }); it('check if Flip V tool will flip the image vertically in the viewport', () => { @@ -515,6 +511,5 @@ describe('OHIF Cornerstone Toolbar', () => { // Visual comparison cy.screenshot('Flip V tool - Should Flip Image on X axis'); - cy.percyCanvasSnapshot('Flip V tool - Should Flip Image on X axis'); }); }); diff --git a/platform/viewer/cypress/integration/common/OHIFDownloadSnapshotFile.spec.js b/platform/viewer/cypress/integration/common/OHIFDownloadSnapshotFile.spec.js index af5d4b6f1..aeda93764 100644 --- a/platform/viewer/cypress/integration/common/OHIFDownloadSnapshotFile.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFDownloadSnapshotFile.spec.js @@ -21,7 +21,6 @@ describe('OHIF Download Snapshot File', () => { cy.viewport(1000, 660); // Visual comparison cy.screenshot('Download Image Modal - Tablet experience'); - cy.percyCanvasSnapshot('Download Image Modal - Tablet experience'); }); it('checks displayed information for Desktop experience', function() { @@ -29,7 +28,6 @@ describe('OHIF Download Snapshot File', () => { cy.viewport(1750, 720); // Visual comparison cy.screenshot('Download Image Modal - Desktop experience'); - cy.percyCanvasSnapshot('Download Image Modal - Desktop experience'); //Check if all elements are displayed cy.get('[data-cy=modal-header]') .as('downloadImageModal') @@ -109,7 +107,6 @@ describe('OHIF Download Snapshot File', () => { cy.get('[data-cy="image-preview"]').scrollIntoView(); // Visual comparison cy.screenshot('Download Image Modal - Show Annotations checked'); - cy.percyCanvasSnapshot('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') diff --git a/platform/viewer/cypress/integration/common/OHIFRoutes.spec.js b/platform/viewer/cypress/integration/common/OHIFRoutes.spec.js index fd411f917..e51f48cc8 100644 --- a/platform/viewer/cypress/integration/common/OHIFRoutes.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFRoutes.spec.js @@ -6,7 +6,9 @@ describe('OHIF Routes', function() { }); it('checks PT/CT json url study route', function() { - cy.visit('/viewer?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/JSON/PTCTStudy.json'); + cy.visit( + '/viewer?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/JSON/PTCTStudy.json' + ); cy.server(); cy.route('GET', '**/PTCTStudy/**').as('getPTCTStudy'); @@ -15,8 +17,5 @@ describe('OHIF Routes', function() { cy.get('@getPTCTStudy').should($route => { expect($route.status).to.be.eq(200); }); - - cy.screenshot(); - cy.percyCanvasSnapshot('PT/CT json study route'); }); }); diff --git a/platform/viewer/cypress/integration/common/OHIFStandaloneViewer.spec.js b/platform/viewer/cypress/integration/common/OHIFStandaloneViewer.spec.js index 32d2e2c83..d5677275e 100644 --- a/platform/viewer/cypress/integration/common/OHIFStandaloneViewer.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFStandaloneViewer.spec.js @@ -4,9 +4,6 @@ describe('OHIFStandaloneViewer', () => { }); it('loads route with at least 2 rows', () => { - cy.screenshot('Study List'); - cy.percyCanvasSnapshot('Study List'); - cy.get('[data-cy="study-list-results"] tr') .its('length') .should('be.gt', 2); diff --git a/platform/viewer/cypress/integration/common/OHIFStudyList.spec.js b/platform/viewer/cypress/integration/common/OHIFStudyList.spec.js index ac80c6e20..c5ce2944f 100644 --- a/platform/viewer/cypress/integration/common/OHIFStudyList.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFStudyList.spec.js @@ -1,14 +1,14 @@ //We are keeping the hardcoded results values for the study list tests //this is intended to be running in a controled docker environment with test data. -describe('OHIF Study List', function () { - context('Desktop resolution', function () { - beforeEach(function () { +describe('OHIF Study List', function() { + context('Desktop resolution', function() { + beforeEach(function() { cy.viewport(1750, 720); cy.openStudyList(); cy.initStudyListAliasesOnDesktop(); }); - it('searches Patient Name with exact string', function () { + it('searches Patient Name with exact string', function() { cy.get('@patientName').type('Juno'); //Wait result list to be displayed cy.waitStudyList(); @@ -18,7 +18,7 @@ describe('OHIF Study List', function () { }); }); - it('searches MRN with exact string', function () { + it('searches MRN with exact string', function() { cy.get('@MRN').type('ProstateX-0000'); //Wait result list to be displayed cy.waitStudyList(); @@ -28,7 +28,7 @@ describe('OHIF Study List', function () { }); }); - it('searches Accession with exact string', function () { + it('searches Accession with exact string', function() { cy.get('@accessionNumber').type('fpcben98890'); //Wait result list to be displayed cy.waitStudyList(); @@ -38,17 +38,17 @@ describe('OHIF Study List', function () { }); }); - it('searches Modality with camel case', function () { + it('searches Modality with camel case', function() { cy.get('@modalities').type('Mr'); //Wait result list to be displayed cy.waitStudyList(); cy.get('@searchResult').should($list => { - expect($list.length).to.be.eq(18); + expect($list.length).to.be.eq(17); expect($list).to.contain('MR'); }); }); - it('searches Description with exact string', function () { + it('searches Description with exact string', function() { cy.get('@studyDescription').type('CHEST'); //Wait result list to be displayed cy.waitStudyList(); @@ -58,7 +58,7 @@ describe('OHIF Study List', function () { }); }); - 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 const pageRows = [25, 50, 100]; @@ -100,14 +100,14 @@ describe('OHIF Study List', function () { // }); }); - context('Tablet resolution', function () { - beforeEach(function () { + context('Tablet resolution', function() { + beforeEach(function() { cy.viewport(1000, 660); cy.openStudyList(); cy.initStudyListAliasesOnTablet(); }); - it('searches Patient Name with exact string', function () { + it('searches Patient Name with exact string', function() { cy.get('@patientNameOrMRN').type('Juno'); //Wait result list to be displayed cy.waitStudyList(); @@ -117,7 +117,7 @@ describe('OHIF Study List', function () { }); }); - it('searches MRN with with exact string', function () { + it('searches MRN with with exact string', function() { cy.get('@patientNameOrMRN').type('ProstateX-0000'); //Wait result list to be displayed cy.waitStudyList(); @@ -127,17 +127,17 @@ describe('OHIF Study List', function () { }); }); - it('searches Modality with exact string', function () { + 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 => { - expect($list.length).to.be.eq(18); + expect($list.length).to.be.eq(17); expect($list).to.contain('MR'); }); }); - it('searches Accession with exact string', function () { + it('searches Accession with exact string', function() { cy.get('@accessionModalityDescription').type('fpcben98890'); //Wait result list to be displayed cy.waitStudyList(); @@ -147,7 +147,7 @@ describe('OHIF Study List', function () { }); }); - it('searches Description with exact string', function () { + it('searches Description with exact string', function() { cy.get('@accessionModalityDescription').type('CHEST'); //Wait result list to be displayed cy.waitStudyList(); @@ -157,7 +157,7 @@ describe('OHIF Study List', function () { }); }); - 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 const pageRows = [25, 50, 100]; diff --git a/platform/viewer/cypress/integration/common/OHIFStudyViewer.spec.js b/platform/viewer/cypress/integration/common/OHIFStudyViewer.spec.js index d13313afd..65f3b192b 100644 --- a/platform/viewer/cypress/integration/common/OHIFStudyViewer.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFStudyViewer.spec.js @@ -12,7 +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.percyCanvasSnapshot('Series Thumbnails - Should Display Thumbnails'); cy.get('[data-cy="thumbnail-list"]') .its('length') @@ -293,7 +292,6 @@ describe('OHIF Study Viewer Page', function() { // Visual comparison cy.screenshot('About modal - Should display modal'); - cy.percyCanvasSnapshot('About modal - Should display modal'); //close modal cy.get('[data-cy="close-button"]').click(); diff --git a/platform/viewer/cypress/integration/common/OHIFUserPreferences.spec.js b/platform/viewer/cypress/integration/common/OHIFUserPreferences.spec.js index 413714f52..a77216e1e 100644 --- a/platform/viewer/cypress/integration/common/OHIFUserPreferences.spec.js +++ b/platform/viewer/cypress/integration/common/OHIFUserPreferences.spec.js @@ -24,10 +24,7 @@ describe('OHIF User Preferences', () => { // Visual comparison cy.screenshot( - 'User Preferences Modal - Hotkeys tab initial state in Study Viewer page' - ); - cy.percyCanvasSnapshot( - 'User Preferences Modal - Hotkeys tab initial state in Study Viewer page' + 'User Preferences Modal - Hotkeys tab initial state in Study List page' ); cy.get('[data-cy="close-button"]').click(); }); @@ -42,16 +39,10 @@ describe('OHIF User Preferences', () => { // Visual comparison cy.screenshot( - 'User Preferences Modal - General tab initial state in Study Viewer page' + 'User Preferences Modal - General tab initial state in Study List page' ); - cy.percyCanvasSnapshot( - 'User Preferences Modal - General tab initial state in Study Viewer page' - ); - // Select Spanish and Save - cy.get('#language-select').select('Spanish'); - cy.get('@saveBtn') - .scrollIntoView() - .click(); + // Set language to Spanish and save + cy.setLanguage('Spanish'); // Header should be translated to Spanish cy.get('.research-use') @@ -161,11 +152,8 @@ describe('OHIF User Preferences', () => { // Go to General tab cy.get('@userPreferencesGeneralTab').click(); - // Select Spanish and Save - cy.get('#language-select').select('Spanish'); - cy.get('@saveBtn') - .scrollIntoView() - .click(); + // Set language to Spanish + cy.setLanguage('Spanish'); // Go to Study Viewer page cy.openStudy('MISTER^MR'); @@ -191,7 +179,9 @@ describe('OHIF User Preferences', () => { .should('contain.text', 'Preferencias'); // Check if new hotkey is working on viewport - cy.get('body').type('{shift}Q', { release: false }); + cy.get('body').type('{shift}Q', { + release: false, + }); cy.get('@viewportInfoMidTop').should('contains.text', 'R'); }); }); @@ -225,10 +215,7 @@ describe('OHIF User Preferences', () => { // Visual comparison cy.screenshot( - 'User Preferences Modal - Hotkeys tab initial state in Study List page' - ); - cy.percyCanvasSnapshot( - 'User Preferences Modal - Hotkeys tab initial state in Study List page' + 'User Preferences Modal - Hotkeys tab initial state in Study Viewer page' ); cy.get('[data-cy="close-button"]').click(); //close User Preferences modal }); @@ -243,16 +230,10 @@ describe('OHIF User Preferences', () => { // Visual comparison cy.screenshot( - 'User Preferences Modal - General tab initial state in Study List page' + 'User Preferences Modal - General tab initial state in Study Viewer page' ); - cy.percyCanvasSnapshot( - 'User Preferences Modal - General tab initial state in Study List page' - ); - // Select Spanish and Save - cy.get('#language-select').select('Spanish'); - cy.get('@saveBtn') - .scrollIntoView() - .click(); + // Set language to Spanish + cy.setLanguage('Spanish'); // Header should be translated to Spanish cy.get('.research-use') @@ -310,19 +291,11 @@ describe('OHIF User Preferences', () => { // Language dropdown should be displayed cy.get('#language-select').should('be.visible'); - // Select Spanish and Save - cy.get('#language-select').select('Spanish'); - cy.get('@saveBtn') - .scrollIntoView() - .click(); + // Set language to Spanish + cy.setLanguage('Spanish'); - //Open Preferences again - cy.get('[data-cy="options-menu"]') - .scrollIntoView() - .click(); - cy.get('[data-cy="dd-item-menu"]') - .last() - .click(); + // Open User Preferences modal + cy.openPreferences(); // Go to general tab cy.get('@userPreferencesGeneralTab').click(); @@ -437,9 +410,7 @@ describe('OHIF User Preferences', () => { // Visual comparison cy.screenshot('Viewport Navigation - 2nd viewport inverted and rotated'); - cy.percyCanvasSnapshot( - 'Viewport Navigation - 2nd viewport inverted and rotated' - ); + // Set 1 viewport layout cy.setLayout(1, 1); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js new file mode 100644 index 000000000..4f6a74c3c --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js @@ -0,0 +1,33 @@ +describe('Visual Regression - OHIF Cornerstone Hotkeys', () => { + before(() => { + cy.openStudy('MISTER^MR'); + cy.waitDicomImage(); + cy.expectMinimumThumbnails(3); + }); + + beforeEach(() => { + cy.initCornerstoneToolsAliases(); + cy.initCommonElementsAliases(); + cy.resetViewport(); + }); + + 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'); + cy.percyCanvasSnapshot('Hotkey I - Should Invert Image'); + }); + + it('checks if hotkey "SPACEBAR" can reset the image', () => { + // Press multiples hotkeys + cy.get('body').type('V+++I'); + + // Hotkey SPACEBAR + cy.get('body').type(' '); + + // Visual comparison to make sure the 'inverted' image was reset + cy.screenshot('Hotkey SPACEBAR - Should Reset Image'); + cy.percyCanvasSnapshot('Hotkey SPACEBAR - Should Reset Image'); + }); +}); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js new file mode 100644 index 000000000..a9f0211fa --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js @@ -0,0 +1,89 @@ +describe('Visual Regression - OHIF Cornerstone Toolbar', () => { + before(() => { + cy.openStudy('MISTER^MR'); + cy.waitDicomImage(); + cy.expectMinimumThumbnails(5); + }); + + beforeEach(() => { + cy.initCornerstoneToolsAliases(); + cy.initCommonElementsAliases(); + cy.resetViewport(); + }); + + it('checks if Pan tool will move the image inside the viewport', () => { + //Click on button and vefiry if icon is active on toolbar + cy.get('@panBtn') + .click() + .then($panBtn => { + cy.wrap($panBtn).should('have.class', 'active'); + }); + + cy.get('@viewport') + .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'); + cy.percyCanvasSnapshot('Pan tool moved the image inside the viewport'); + }); + + 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'); + cy.percyCanvasSnapshot('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(); + //Verify if overlay is displayed + cy.get('.tooltip-toolbar-overlay') + .should('be.visible') + .then(() => { + //Click on Rotate button + cy.get('[data-cy="rotate right"]').click({ force: true }); + }); + + // Visual comparison + cy.screenshot('Rotate tool - Should Rotate Image to Right'); + cy.percyCanvasSnapshot('Rotate tool - Should Rotate Image to Right'); + }); + + it('check if Flip H tool will flip the image horizontally 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 Flip H button + cy.get('[data-cy="flip h"]').click(); + + // Visual comparison + cy.screenshot('Flip H tool - Should Flip Image on Y axis'); + cy.percyCanvasSnapshot('Flip H tool - Should Flip Image on Y axis'); + }); + + it('check if Flip V tool will flip the image vertically 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 Flip V button + cy.get('[data-cy="flip v"]').click(); + + // Visual comparison + cy.screenshot('Flip V tool - Should Flip Image on X axis'); + cy.percyCanvasSnapshot('Flip V tool - Should Flip Image on X axis'); + }); +}); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js new file mode 100644 index 000000000..dee9cc566 --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js @@ -0,0 +1,53 @@ +describe('Visual Regression - OHIF Download Snapshot File', () => { + before(() => { + cy.openStudy('MISTER^MR'); + cy.waitDicomImage(); + cy.expectMinimumThumbnails(5); + }); + + beforeEach(() => { + cy.openDownloadImageModal(); + }); + + afterEach(() => { + // Close modal + cy.get('[data-cy="close-button"]') + .scrollIntoView() + .click(); + }); + + it('checks displayed information for Tablet experience', function() { + // Set Tablet resolution + cy.viewport(1000, 660); + // Visual comparison + cy.screenshot('Download Image Modal - Tablet experience'); + cy.percyCanvasSnapshot('Download Image Modal - Tablet experience'); + }); + + it('checks displayed information for Desktop experience', function() { + // Set Desktop resolution + cy.viewport(1750, 720); + // Visual comparison + cy.screenshot('Download Image Modal - Desktop experience'); + cy.percyCanvasSnapshot('Download Image Modal - Desktop experience'); + }); + + it('checks if "Show Annotations" checkbox will display annotations', function() { + // Close modal that is initially opened + cy.get('[data-cy="close-button"]').click(); + + // Add measurements in the viewport + cy.addLengthMeasurement(); + cy.addAngleMeasurement(); + + // Open Modal + cy.openDownloadImageModal(); + // Select "Show Annotations" option + 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'); + cy.percyCanvasSnapshot('Download Image Modal - Show Annotations checked'); + }); +}); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js new file mode 100644 index 000000000..14f901bdd --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js @@ -0,0 +1,24 @@ +//We excluded the tests for '**/studies/**' because the bulk/all of our other study/viewer tests use this route + +describe('Visual Regression - OHIF Routes', function() { + beforeEach(function() { + cy.openStudyList(); + }); + + it('checks PT/CT json url study route', function() { + cy.visit( + '/viewer?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/JSON/PTCTStudy.json' + ); + + cy.server(); + cy.route('GET', '**/PTCTStudy/**').as('getPTCTStudy'); + + cy.wait('@getPTCTStudy.all'); + cy.get('@getPTCTStudy').should($route => { + expect($route.status).to.be.eq(200); + }); + + cy.screenshot('PTCT json study route'); + cy.percyCanvasSnapshot('PT/CT json study route'); + }); +}); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js new file mode 100644 index 000000000..c1e4b5b1d --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js @@ -0,0 +1,37 @@ +describe('Visual Regression - OHIF Study Viewer Page', function() { + before(function() { + cy.openStudy('MISTER^MR'); + cy.waitDicomImage(); + cy.expectMinimumThumbnails(6); + }); + + beforeEach(function() { + cy.initCommonElementsAliases(); + cy.resetViewport(); + }); + + it('checks if series thumbnails are being displayed', function() { + cy.screenshot('Series Thumbnails - Should Display Thumbnails'); + cy.percyCanvasSnapshot('Series Thumbnails - Should Display Thumbnails'); + }); + + it('opens About modal and verify the displayed information', function() { + cy.get('[data-cy="options-menu"]') + .first() + .click(); + cy.get('[data-cy="dd-item-menu"]') + .first() + .click(); + cy.get('[data-cy="about-modal"]') + .as('aboutOverlay') + .should('be.visible'); + + // Visual comparison + cy.screenshot('About modal - Should display modal'); + cy.percyCanvasSnapshot('About modal - Should display modal'); + + //close modal + cy.get('[data-cy="close-button"]').click(); + cy.get('@aboutOverlay').should('not.be.enabled'); + }); +}); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js new file mode 100644 index 000000000..68e43228d --- /dev/null +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js @@ -0,0 +1,210 @@ +describe('Visual Regression - OHIF User Preferences', () => { + context('Study List Page', function() { + before(() => { + cy.visit('/'); + }); + + beforeEach(() => { + // Open User Preferences modal + cy.openPreferences(); + cy.initPreferencesModalAliases(); + }); + + it('checks displayed information on User Preferences modal', function() { + cy.get('@restoreBtn').scrollIntoView(); + + // Visual comparison + cy.screenshot( + 'User Preferences Modal - Hotkeys tab initial state in StudyList page' + ); + cy.percyCanvasSnapshot( + 'User Preferences Modal - Hotkeys tab initial state in StudyList page' + ); + cy.get('[data-cy="close-button"]').click(); + }); + + it('checks translation by selecting Spanish language', function() { + cy.get('@userPreferencesGeneralTab') + .click() + .should('have.class', 'active'); + + // Language dropdown should be displayed + cy.get('#language-select').should('be.visible'); + + // Visual comparison + cy.screenshot( + 'User Preferences Modal - General tab initial state in StudyList page' + ); + cy.percyCanvasSnapshot( + 'User Preferences Modal - General tab initial state in StudyList page' + ); + // Set language to Spanish and save + cy.setLanguage('Spanish'); + + // Options menu should be translated + cy.get('[data-cy="options-menu"]') + .should('have.text', 'Opciones') + .click(); + + // Visual comparison + cy.screenshot( + 'User Preferences Modal - Spanish selected in StudyList page' + ); + cy.percyCanvasSnapshot( + 'User Preferences Modal - Spanish selected in StudyList page' + ); + + // Close Options menu + cy.get('[data-cy="options-menu"]').click(); + }); + }); + + context('Study Viewer Page', function() { + before(() => { + cy.openStudy('MISTER^MR'); + cy.expectMinimumThumbnails(5); + }); + + beforeEach(() => { + cy.initCommonElementsAliases(); + cy.resetViewport(); + + cy.resetUserHoktkeyPreferences(); + // Open User Preferences modal + cy.openPreferences(); + }); + + it('checks displayed information on User Preferences modal', function() { + cy.get('@restoreBtn').scrollIntoView(); + + // Visual comparison + cy.screenshot( + 'User Preferences Modal - Hotkeys tab initial state in StudyViewer page' + ); + cy.percyCanvasSnapshot( + 'User Preferences Modal - Hotkeys tab initial state in StudyViewer page' + ); + cy.get('[data-cy="close-button"]').click(); //close User Preferences modal + }); + + it('checks translation by selecting Spanish language', function() { + cy.get('@userPreferencesGeneralTab') + .click() + .should('have.class', 'active'); + + // Visual comparison + cy.screenshot( + 'User Preferences Modal - General tab initial state in StudyViewer page' + ); + cy.percyCanvasSnapshot( + 'User Preferences Modal - General tab initial state in StudyViewer page' + ); + // Set language to Spanish + cy.setLanguage('Spanish'); + + // Options menu should be translated + cy.get('[data-cy="options-menu"]') + .should('have.text', 'Opciones') + .click(); + + // Visual comparison + cy.screenshot( + 'User Preferences Modal - Spanish selected in StudyViewer page' + ); + cy.percyCanvasSnapshot( + 'User Preferences Modal - Spanish selected in StudyViewer page' + ); + + // Close Options menu + cy.get('[data-cy="options-menu"]').click(); + }); + + it('checks if user can restore to default the language selection and application will be in English', function() { + cy.get('@userPreferencesGeneralTab') + .click() + .should('have.class', 'active'); + + // Set language to Spanish + cy.setLanguage('Spanish'); + + // Open User Preferences modal + cy.openPreferences(); + + // Go to general tab + cy.get('@userPreferencesGeneralTab').click(); + + cy.get('@restoreBtn') + .scrollIntoView() + .click(); + + cy.get('@saveBtn') + .scrollIntoView() + .click(); + + // Options menu should be in English + cy.get('[data-cy="options-menu"]') + .should('have.text', 'Options') + .click(); + + // Visual comparison + cy.screenshot( + 'User Preferences Modal - English selected in StudyViewer page' + ); + cy.percyCanvasSnapshot( + 'User Preferences Modal - English selected in StudyViewer page' + ); + + // Close Options menu + cy.get('[data-cy="options-menu"]').click(); + }); + + it('checks new hotkeys for "Next" and "Previous" Image on Viewport', function() { + // Go go hotkeys tab + cy.get('@userPreferencesHotkeysTab') + .click() + .should('have.class', 'active'); + + // Set new hotkey for 'Next Image Viewport' function + cy.setNewHotkeyShortcutOnUserPreferencesModal( + 'Next Image Viewport', + '{shift}{rightarrow}' + ); + + // Set new hotkey for 'Previous Image Viewport' function + cy.setNewHotkeyShortcutOnUserPreferencesModal( + 'Previous Image Viewport', + '{shift}{leftarrow}' + ); + + // Save new hotkeys + cy.get('@saveBtn') + .scrollIntoView() + .click(); + + // Set 3 viewports layout + cy.setLayout(3, 1); + cy.waitViewportImageLoading(); + + // Rotate Right and Invert colors on Viewport #1 + cy.get('body').type('RI'); + + //Move to Next Viewport + cy.get('body').type('{shift}{rightarrow}'); + // Rotate Left and Invert colors on Viewport #2 + cy.get('body').type('LI'); + + //Move to Previous Viewport + cy.get('body').type('{shift}{leftarrow}'); + // Reset viewport #1 with spacebar hotkey + cy.get('body').type(' '); + + // Visual comparison + cy.screenshot('Viewport Navigation - 2nd viewport inverted and rotated'); + cy.percyCanvasSnapshot( + 'Viewport Navigation - 2nd viewport inverted and rotated' + ); + // Set 1 viewport layout + cy.setLayout(1, 1); + }); + }); +}); From 86426cb02405d7d56986a5f49e519616bbe3ad1d Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Mon, 6 Jan 2020 17:08:00 -0300 Subject: [PATCH 03/13] Changed command CI line for diff test paths --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 258b6fdc8..87dcc47f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -328,6 +328,7 @@ workflows: working_directory: platform/viewer build: npx cross-env QUICK_BUILD=true yarn run build start: yarn run test:e2e:serve + spec: 'cypress/integration/common/**/*,cypress/integration/pwa/**/*' wait-on: 'http://localhost:3000' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace @@ -352,7 +353,7 @@ workflows: working_directory: platform/viewer build: npx cross-env QUICK_BUILD=true yarn run build:package start: yarn run test:e2e:serve - spec: 'cypress/integration/common/**/*' + spec: 'cypress/integration/common/**/*,cypress/integration/script-tag/**/*' wait-on: 'http://localhost:3000' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace @@ -381,7 +382,7 @@ workflows: working_directory: platform/viewer build: npx cross-env QUICK_BUILD=true yarn run build # start server --> verify running --> percy + chrome + cypress - command: yarn run test:e2e:dist + start: yarn run test:e2e:dist spec: 'cypress/integration/visual-regression/**/*' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace @@ -460,7 +461,6 @@ workflows: build: npx cross-env QUICK_BUILD=true yarn run build # start server --> verify running --> percy + chrome + cypress command: yarn run test:e2e:dist - spec: 'cypress/integration/visual-regression/**/*' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace post-steps: From 7b80171203d28543f56a83100e0b948ddad6528e Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Mon, 6 Jan 2020 18:54:09 -0300 Subject: [PATCH 04/13] Removing unnecessary screenshots --- .circleci/config.yml | 4 ++-- .../PercyCheckOHIFCornerstoneHotkeys.spec.js | 2 -- .../PercyCheckOHIFCornerstoneToolbar.spec.js | 5 ----- ...PercyCheckOHIFDownloadSnapshotFile.spec.js | 3 --- .../PercyCheckOHIFExtensionMicroscopy.spec.js | 1 - .../PercyCheckOHIFExtensionPDF.spec.js | 1 - .../PercyCheckOHIFExtensionVTK.spec.js | 6 ----- .../PercyCheckOHIFRoutes.spec.js | 1 - .../PercyCheckOHIFStudyViewer.spec.js | 2 -- .../PercyCheckOHIFUserPreferences.spec.js | 22 ------------------- 10 files changed, 2 insertions(+), 45 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 87dcc47f4..23e6eb34d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -388,9 +388,9 @@ workflows: no-workspace: true # Don't persist workspace post-steps: - store_artifacts: - path: platform/viewer/cypress/screenshots + path: platform/viewer/cypress/screenshots/visual-regression - store_artifacts: - path: platform/viewer/cypress/videos + path: platform/viewer/cypress/videos/visual-regression requires: - AWAIT_APPROVAL diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js index 4f6a74c3c..582a59799 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js @@ -15,7 +15,6 @@ describe('Visual Regression - OHIF Cornerstone Hotkeys', () => { // Hotkey I cy.get('body').type('I'); // Visual comparison - cy.screenshot('Hotkey I - Should Invert Image'); cy.percyCanvasSnapshot('Hotkey I - Should Invert Image'); }); @@ -27,7 +26,6 @@ describe('Visual Regression - OHIF Cornerstone Hotkeys', () => { cy.get('body').type(' '); // Visual comparison to make sure the 'inverted' image was reset - cy.screenshot('Hotkey SPACEBAR - Should Reset Image'); cy.percyCanvasSnapshot('Hotkey SPACEBAR - Should Reset Image'); }); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js index a9f0211fa..ade703664 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneToolbar.spec.js @@ -25,7 +25,6 @@ describe('Visual Regression - OHIF Cornerstone Toolbar', () => { .trigger('mouseup', 'bottom'); // Visual comparison - cy.screenshot('Pan tool moved the image inside the viewport'); cy.percyCanvasSnapshot('Pan tool moved the image inside the viewport'); }); @@ -39,7 +38,6 @@ describe('Visual Regression - OHIF Cornerstone Toolbar', () => { cy.get('[data-cy="invert"]').click(); // Visual comparison - cy.screenshot('Invert tool - Should Invert Canvas'); cy.percyCanvasSnapshot('Invert tool - Should Invert Canvas'); }); @@ -55,7 +53,6 @@ describe('Visual Regression - OHIF Cornerstone Toolbar', () => { }); // Visual comparison - cy.screenshot('Rotate tool - Should Rotate Image to Right'); cy.percyCanvasSnapshot('Rotate tool - Should Rotate Image to Right'); }); @@ -69,7 +66,6 @@ describe('Visual Regression - OHIF Cornerstone Toolbar', () => { cy.get('[data-cy="flip h"]').click(); // Visual comparison - cy.screenshot('Flip H tool - Should Flip Image on Y axis'); cy.percyCanvasSnapshot('Flip H tool - Should Flip Image on Y axis'); }); @@ -83,7 +79,6 @@ describe('Visual Regression - OHIF Cornerstone Toolbar', () => { cy.get('[data-cy="flip v"]').click(); // Visual comparison - cy.screenshot('Flip V tool - Should Flip Image on X axis'); cy.percyCanvasSnapshot('Flip V tool - Should Flip Image on X axis'); }); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js index dee9cc566..bb93e18bf 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFDownloadSnapshotFile.spec.js @@ -20,7 +20,6 @@ describe('Visual Regression - OHIF Download Snapshot File', () => { // Set Tablet resolution cy.viewport(1000, 660); // Visual comparison - cy.screenshot('Download Image Modal - Tablet experience'); cy.percyCanvasSnapshot('Download Image Modal - Tablet experience'); }); @@ -28,7 +27,6 @@ describe('Visual Regression - OHIF Download Snapshot File', () => { // Set Desktop resolution cy.viewport(1750, 720); // Visual comparison - cy.screenshot('Download Image Modal - Desktop experience'); cy.percyCanvasSnapshot('Download Image Modal - Desktop experience'); }); @@ -47,7 +45,6 @@ describe('Visual Regression - OHIF Download Snapshot File', () => { // Check image preview cy.get('[data-cy="image-preview"]').scrollIntoView(); // Visual comparison - cy.screenshot('Download Image Modal - Show Annotations checked'); cy.percyCanvasSnapshot('Download Image Modal - Show Annotations checked'); }); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js index 5586a5d99..ac9a883f8 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionMicroscopy.spec.js @@ -15,7 +15,6 @@ describe('Visual Regression - OHIF Microscopy Extension', () => { cy.wait(3000); //Waiting for image to render before taking the snapshot // Visual comparison - cy.screenshot('Microscopy Extension - Should display loaded canvas'); cy.percyCanvasSnapshot( 'Microscopy Extension - Should display loaded canvas' ); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js index da286d9b3..7dadf35d2 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionPDF.spec.js @@ -15,7 +15,6 @@ describe('Visual Regression - OHIF PDF Extension', () => { // This won't work unless we switch to an extension that renders using `canvas` // Currently, we rely on the browser's built-in implementation - cy.screenshot('PDF Extension - Should load PDF file'); cy.percyCanvasSnapshot('PDF Extension - Should load PDF file'); }); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js index c353c02ba..7aacf5197 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js @@ -36,7 +36,6 @@ describe('Visual Regression - OHIF VTK Extension', () => { it('checks if VTK buttons are displayed on the toolbar', () => { // Visual comparison - cy.screenshot('VTK initial state - Should display toolbar and 3 viewports'); cy.percyCanvasSnapshot( 'VTK initial state - Should display toolbar and 3 viewports' ); @@ -52,9 +51,6 @@ describe('Visual Regression - OHIF VTK Extension', () => { .trigger('mouseup'); // Visual comparison - cy.screenshot( - "VTK Crosshairs tool - Should display crosshairs' green lines" - ); cy.percyCanvasSnapshot( "VTK Crosshairs tool - Should display crosshairs' green lines" ); @@ -72,7 +68,6 @@ describe('Visual Regression - OHIF VTK Extension', () => { .trigger('mouseup', { which: 1 }); // Visual comparison - cy.screenshot('VTK WWWC tool - Canvas should be bright'); cy.percyCanvasSnapshot('VTK WWWC tool - Canvas should be bright'); }); @@ -88,7 +83,6 @@ describe('Visual Regression - OHIF VTK Extension', () => { .trigger('mouseup', { which: 1 }); // Visual comparison - cy.screenshot('VTK Rotate tool - Should rotate image'); cy.percyCanvasSnapshot('VTK Rotate tool - Should rotate image'); }); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js index 14f901bdd..dd949c240 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFRoutes.spec.js @@ -18,7 +18,6 @@ describe('Visual Regression - OHIF Routes', function() { expect($route.status).to.be.eq(200); }); - cy.screenshot('PTCT json study route'); cy.percyCanvasSnapshot('PT/CT json study route'); }); }); diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js index c1e4b5b1d..7c1d7413e 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFStudyViewer.spec.js @@ -11,7 +11,6 @@ describe('Visual Regression - OHIF Study Viewer Page', function() { }); it('checks if series thumbnails are being displayed', function() { - cy.screenshot('Series Thumbnails - Should Display Thumbnails'); cy.percyCanvasSnapshot('Series Thumbnails - Should Display Thumbnails'); }); @@ -27,7 +26,6 @@ describe('Visual Regression - OHIF Study Viewer Page', function() { .should('be.visible'); // Visual comparison - cy.screenshot('About modal - Should display modal'); cy.percyCanvasSnapshot('About modal - Should display modal'); //close modal diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js index 68e43228d..4bf066add 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFUserPreferences.spec.js @@ -14,9 +14,6 @@ describe('Visual Regression - OHIF User Preferences', () => { cy.get('@restoreBtn').scrollIntoView(); // Visual comparison - cy.screenshot( - 'User Preferences Modal - Hotkeys tab initial state in StudyList page' - ); cy.percyCanvasSnapshot( 'User Preferences Modal - Hotkeys tab initial state in StudyList page' ); @@ -32,9 +29,6 @@ describe('Visual Regression - OHIF User Preferences', () => { cy.get('#language-select').should('be.visible'); // Visual comparison - cy.screenshot( - 'User Preferences Modal - General tab initial state in StudyList page' - ); cy.percyCanvasSnapshot( 'User Preferences Modal - General tab initial state in StudyList page' ); @@ -47,9 +41,6 @@ describe('Visual Regression - OHIF User Preferences', () => { .click(); // Visual comparison - cy.screenshot( - 'User Preferences Modal - Spanish selected in StudyList page' - ); cy.percyCanvasSnapshot( 'User Preferences Modal - Spanish selected in StudyList page' ); @@ -78,9 +69,6 @@ describe('Visual Regression - OHIF User Preferences', () => { cy.get('@restoreBtn').scrollIntoView(); // Visual comparison - cy.screenshot( - 'User Preferences Modal - Hotkeys tab initial state in StudyViewer page' - ); cy.percyCanvasSnapshot( 'User Preferences Modal - Hotkeys tab initial state in StudyViewer page' ); @@ -93,9 +81,6 @@ describe('Visual Regression - OHIF User Preferences', () => { .should('have.class', 'active'); // Visual comparison - cy.screenshot( - 'User Preferences Modal - General tab initial state in StudyViewer page' - ); cy.percyCanvasSnapshot( 'User Preferences Modal - General tab initial state in StudyViewer page' ); @@ -108,9 +93,6 @@ describe('Visual Regression - OHIF User Preferences', () => { .click(); // Visual comparison - cy.screenshot( - 'User Preferences Modal - Spanish selected in StudyViewer page' - ); cy.percyCanvasSnapshot( 'User Preferences Modal - Spanish selected in StudyViewer page' ); @@ -147,9 +129,6 @@ describe('Visual Regression - OHIF User Preferences', () => { .click(); // Visual comparison - cy.screenshot( - 'User Preferences Modal - English selected in StudyViewer page' - ); cy.percyCanvasSnapshot( 'User Preferences Modal - English selected in StudyViewer page' ); @@ -199,7 +178,6 @@ describe('Visual Regression - OHIF User Preferences', () => { cy.get('body').type(' '); // Visual comparison - cy.screenshot('Viewport Navigation - 2nd viewport inverted and rotated'); cy.percyCanvasSnapshot( 'Viewport Navigation - 2nd viewport inverted and rotated' ); From 9be54f6164153a86577d18ddce130f2a993bb15b Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Tue, 7 Jan 2020 16:52:28 -0300 Subject: [PATCH 05/13] Improvements on VTK visual tests --- .../PercyCheckOHIFExtensionVTK.spec.js | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js index 7aacf5197..66512f7f4 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js @@ -1,28 +1,17 @@ describe('Visual Regression - OHIF VTK Extension', () => { before(() => { - cy.openStudy('Juno'); + cy.openStudy('Bellona'); cy.waitDicomImage(); - cy.expectMinimumThumbnails(7); - }); - - beforeEach(() => { - //TODO: Due to percy snapshot, the images inside the viewports are being resized - //and once the browser continues the test execution, the images are not centered in the viewport. - //To fix that, we need to reload the page before each test. - //https://github.com/OHIF/Viewers/issues/1168 - cy.reload(); + cy.expectMinimumThumbnails(5); //Waiting for the desired thumbnail content to be displayed cy.get('[data-cy="thumbnail-list"]').should($list => { - expect($list).to.contain('CT WB 5.0 B35f'); + expect($list).to.contain('Chest 1x10 Soft'); }); - // TODO: We shouldn't have to drag the thumbnail - // This is a known bug; 2D MPR button does not show until viewport - // has data from a drag-n-drop - // Drag and drop third thumbnail into first viewport + // Drag and drop thumbnail into viewport cy.get('[data-cy="thumbnail-list"]') - .contains('CT WB 5.0 B35f') + .contains('Chest 1x10 Soft') .drag('.viewport-drop-target'); //Select 2D MPR button @@ -30,8 +19,18 @@ describe('Visual Regression - OHIF VTK Extension', () => { //Wait Reformatting Images cy.waitVTKReformatting(); + }); + beforeEach(() => { cy.initVTKToolsAliases(); + cy.wait(100); //Wait toolbar to finish loading + }); + + afterEach(() => { + //Select Exit 2D MPR button + cy.get('[data-cy="exit 2d mpr"]').click(); + //Select 2D MPR button + cy.get('[data-cy="2d mpr"]').click(); }); it('checks if VTK buttons are displayed on the toolbar', () => { From 6dac50c7c69fb09afd65dcd018578e39a74a5189 Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Tue, 7 Jan 2020 17:23:35 -0300 Subject: [PATCH 06/13] Improvements on VTK visual tests 2 --- .../visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js index 582a59799..4f6a74c3c 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFCornerstoneHotkeys.spec.js @@ -15,6 +15,7 @@ describe('Visual Regression - OHIF Cornerstone Hotkeys', () => { // Hotkey I cy.get('body').type('I'); // Visual comparison + cy.screenshot('Hotkey I - Should Invert Image'); cy.percyCanvasSnapshot('Hotkey I - Should Invert Image'); }); @@ -26,6 +27,7 @@ describe('Visual Regression - OHIF Cornerstone Hotkeys', () => { cy.get('body').type(' '); // Visual comparison to make sure the 'inverted' image was reset + cy.screenshot('Hotkey SPACEBAR - Should Reset Image'); cy.percyCanvasSnapshot('Hotkey SPACEBAR - Should Reset Image'); }); }); From e9c449d1db513c366a3d7065dec773c761fdf33c Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Tue, 7 Jan 2020 18:07:20 -0300 Subject: [PATCH 07/13] Changed path for cypress/videos --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23e6eb34d..b248fb504 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -390,7 +390,7 @@ workflows: - store_artifacts: path: platform/viewer/cypress/screenshots/visual-regression - store_artifacts: - path: platform/viewer/cypress/videos/visual-regression + path: platform/viewer/cypress/videos requires: - AWAIT_APPROVAL From dfc35885bbff132ad5b2c75373a64bb1d2f648fe Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Tue, 7 Jan 2020 18:28:16 -0300 Subject: [PATCH 08/13] Changed record to false --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b248fb504..8212a5b4c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -378,6 +378,7 @@ workflows: - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global add wait-on' # Use yarn latest yarn: true + record: false store_artifacts: false working_directory: platform/viewer build: npx cross-env QUICK_BUILD=true yarn run build From 67f58f5f09573de38e2e6a3f902a53a9fbbe88fb Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Tue, 7 Jan 2020 19:09:04 -0300 Subject: [PATCH 09/13] Added dependency ffmpeg-installer --- platform/viewer/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/viewer/package.json b/platform/viewer/package.json index 361245728..22865a451 100644 --- a/platform/viewer/package.json +++ b/platform/viewer/package.json @@ -54,6 +54,7 @@ "@ohif/i18n": "^0.52.4", "@ohif/ui": "^1.1.7", "@tanem/react-nprogress": "^1.1.25", + "@ffmpeg-installer/ffmpeg": "1.0.20", "classnames": "^2.2.6", "core-js": "^3.2.1", "cornerstone-core": "^2.2.8", From d0fb4843abe16058f88dfdf84a8bbfc93c3f77a2 Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Thu, 9 Jan 2020 15:29:39 -0300 Subject: [PATCH 10/13] Changing screenshot paths back to original --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8212a5b4c..87dcc47f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -378,7 +378,6 @@ workflows: - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global add wait-on' # Use yarn latest yarn: true - record: false store_artifacts: false working_directory: platform/viewer build: npx cross-env QUICK_BUILD=true yarn run build @@ -389,7 +388,7 @@ workflows: no-workspace: true # Don't persist workspace post-steps: - store_artifacts: - path: platform/viewer/cypress/screenshots/visual-regression + path: platform/viewer/cypress/screenshots - store_artifacts: path: platform/viewer/cypress/videos requires: From 910d5c65d50ad5bbb2f9e24b51661a136787e3e8 Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Thu, 9 Jan 2020 16:17:22 -0300 Subject: [PATCH 11/13] Changing RELEASE config to run only percy tests --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 87dcc47f4..116e599ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -460,7 +460,8 @@ workflows: working_directory: platform/viewer build: npx cross-env QUICK_BUILD=true yarn run build # start server --> verify running --> percy + chrome + cypress - command: yarn run test:e2e:dist + start: yarn run test:e2e:dist + spec: 'cypress/integration/visual-regression/**/*' cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace post-steps: From c74c80bb6fb3dfc255f265a619f8c6b39ba1eba5 Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Thu, 9 Jan 2020 16:46:29 -0300 Subject: [PATCH 12/13] Fix for VTK test --- .../visual-regression/PercyCheckOHIFExtensionVTK.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js index 66512f7f4..49aa81218 100644 --- a/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js +++ b/platform/viewer/cypress/integration/visual-regression/PercyCheckOHIFExtensionVTK.spec.js @@ -28,7 +28,10 @@ describe('Visual Regression - OHIF VTK Extension', () => { afterEach(() => { //Select Exit 2D MPR button - cy.get('[data-cy="exit 2d mpr"]').click(); + cy.get('[data-cy="exit 2d mpr"]').should($btn => { + expect($btn).to.be.visible; + $btn.click(); + }); //Select 2D MPR button cy.get('[data-cy="2d mpr"]').click(); }); From 0fb39bad840731a5d5df3a06d812fa1b56983182 Mon Sep 17 00:00:00 2001 From: Mirna Silva Date: Fri, 10 Jan 2020 14:18:20 -0300 Subject: [PATCH 13/13] Changes on config file --- .circleci/config.yml | 3 +-- platform/viewer/cypress.json | 3 ++- platform/viewer/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 116e599ab..aa8d46a33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -382,8 +382,7 @@ workflows: working_directory: platform/viewer build: npx cross-env QUICK_BUILD=true yarn run build # start server --> verify running --> percy + chrome + cypress - start: yarn run test:e2e:dist - spec: 'cypress/integration/visual-regression/**/*' + command: yarn run test:e2e:dist cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' no-workspace: true # Don't persist workspace post-steps: diff --git a/platform/viewer/cypress.json b/platform/viewer/cypress.json index a6bcfd48d..1bc15965b 100644 --- a/platform/viewer/cypress.json +++ b/platform/viewer/cypress.json @@ -5,5 +5,6 @@ "defaultCommandTimeout": 10000, "requestTimeout": 10000, "responseTimeout": 10000, - "projectId": "4oe38f" + "projectId": "4oe38f", + "video": false } diff --git a/platform/viewer/package.json b/platform/viewer/package.json index 2d3e2d84f..83c31b5bf 100644 --- a/platform/viewer/package.json +++ b/platform/viewer/package.json @@ -27,7 +27,7 @@ "dev:viewer": "yarn run dev", "start": "yarn run dev", "test:e2e": "cypress open", - "test:e2e:ci": "percy exec -- cypress run --record --browser chrome", + "test:e2e:ci": "percy exec -- cypress run --config video=false --record --browser chrome --spec 'cypress/integration/visual-regression/**/*'", "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:unit": "jest --watchAll",