Merge pull request #1382 from OHIF/mirna/test/visual-tests
Percy fix for CI failure
This commit is contained in:
3 files changed
+13
-7
No files matched your search
@@ -6,7 +6,8 @@ describe('OHIF Save Measurements', function() {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Drags Study thumbnail into viewport
|
// Drags Study thumbnail into viewport
|
||||||
cy.get('[data-cy="thumbnail-list"]:nth-child(1)')
|
cy.get('[data-cy="thumbnail-list"]')
|
||||||
|
.contains('Rheuma')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.drag('.viewport-drop-target');
|
.drag('.viewport-drop-target');
|
||||||
|
|
||||||
@@ -56,7 +57,9 @@ describe('OHIF Save Measurements', function() {
|
|||||||
cy.get('.sb-success').should('be.visible');
|
cy.get('.sb-success').should('be.visible');
|
||||||
|
|
||||||
// Reload the page
|
// Reload the page
|
||||||
cy.reload();
|
cy.reload()
|
||||||
|
.wait(1000) //Wait page to load
|
||||||
|
.expectMinimumThumbnails(2); //wait all thumbnails to load
|
||||||
|
|
||||||
//Verify that recently added measurement was retrieved
|
//Verify that recently added measurement was retrieved
|
||||||
cy.get('@measurementsBtn').click();
|
cy.get('@measurementsBtn').click();
|
||||||
@@ -105,8 +108,7 @@ describe('OHIF Save Measurements', function() {
|
|||||||
cy.get('.sb-error')
|
cy.get('.sb-error')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.and('contains.text', 'Error while saving the measurements');
|
.and('contains.text', 'Error while saving the measurements');
|
||||||
// Close message overlay
|
|
||||||
cy.get('.sb-closeIcon').click();
|
|
||||||
// Close Measurements panel
|
// Close Measurements panel
|
||||||
cy.get('@measurementsBtn').click();
|
cy.get('@measurementsBtn').click();
|
||||||
});
|
});
|
||||||
@@ -135,7 +137,9 @@ describe('OHIF Save Measurements', function() {
|
|||||||
.and('contains.text', 'Measurements were saved with success');
|
.and('contains.text', 'Measurements were saved with success');
|
||||||
|
|
||||||
// Reload the page
|
// Reload the page
|
||||||
cy.reload();
|
cy.reload()
|
||||||
|
.wait(1000) //Wait page to load
|
||||||
|
.expectMinimumThumbnails(2); //wait all thumbnails to load
|
||||||
|
|
||||||
//Verify that measurement for unsupported tool was not saved
|
//Verify that measurement for unsupported tool was not saved
|
||||||
cy.get('@measurementsBtn').click();
|
cy.get('@measurementsBtn').click();
|
||||||
|
|||||||
+3
-1
@@ -23,10 +23,12 @@ describe('Visual Regression - OHIF VTK Extension', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.initVTKToolsAliases();
|
cy.initVTKToolsAliases();
|
||||||
cy.wait(100); //Wait toolbar to finish loading
|
cy.wait(1000); //Wait toolbar to finish loading
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
cy.wait(5000); //wait screen loads back after screenshot
|
||||||
|
|
||||||
//Select Exit 2D MPR button
|
//Select Exit 2D MPR button
|
||||||
cy.get('[data-cy="exit 2d mpr"]').should($btn => {
|
cy.get('[data-cy="exit 2d mpr"]').should($btn => {
|
||||||
expect($btn).to.be.visible;
|
expect($btn).to.be.visible;
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ Cypress.Commands.add(
|
|||||||
);
|
);
|
||||||
|
|
||||||
Cypress.Commands.add('expectMinimumThumbnails', (seriesToWait = 1) => {
|
Cypress.Commands.add('expectMinimumThumbnails', (seriesToWait = 1) => {
|
||||||
cy.get('[data-cy=thumbnail-list]', { timeout: 10000 }).should($itemList => {
|
cy.get('[data-cy=thumbnail-list]', { timeout: 20000 }).should($itemList => {
|
||||||
expect($itemList.length >= seriesToWait).to.be.true;
|
expect($itemList.length >= seriesToWait).to.be.true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user