Improvements on VTK visual tests
This commit is contained in:
parent
341cc5a4eb
commit
9be54f6164
@ -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', () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user