* Adding Percy Snapshot on VTK, PDF and Microscopy tests * Small improvement to always click on first search result * Wait for search result * Added timouts all over the code to avoid intermitted failures in CI * Increasing Default Timeout and other configs * Cleaning up the code * try force enabling gpu * Try custom executor with newer version of chrome * Fix based on review comments * Increased minimum thumbnails expected on VTK test * Fix config validation * Make sure we're using the chrome browser
55 lines
1.4 KiB
JavaScript
55 lines
1.4 KiB
JavaScript
describe('OHIF VTK Extension', () => {
|
|
before(() => {
|
|
cy.openStudy('Juno');
|
|
cy.waitDicomImage();
|
|
cy.expectMinimumThumbnails(7);
|
|
});
|
|
|
|
beforeEach(() => {
|
|
// 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 first thumbnail into first viewport
|
|
cy.get('[data-cy="thumbnail-list"]:nth-child(3)').drag(
|
|
'.viewport-drop-target'
|
|
);
|
|
|
|
cy.get('.PluginSwitch > .toolbar-button')
|
|
.as('twodmprBtn')
|
|
.should('be.visible')
|
|
.then(btn => {
|
|
if (!btn.text().includes('Exit')) {
|
|
btn.click();
|
|
}
|
|
});
|
|
//wait VTK toolbar and images to be loaded
|
|
cy.wait(3000);
|
|
cy.initVTKToolsAliases();
|
|
});
|
|
|
|
it('checks if VTK buttons are displayed on the toolbar', () => {
|
|
cy.screenshot();
|
|
cy.percySnapshot();
|
|
|
|
cy.get('@crosshairsBtn')
|
|
.should('be.visible')
|
|
.contains('Crosshairs');
|
|
cy.get('@wwwcBtn')
|
|
.should('be.visible')
|
|
.contains('WWWC');
|
|
cy.get('@rotateBtn')
|
|
.should('be.visible')
|
|
.contains('Rotate');
|
|
cy.get('@slabSlider')
|
|
.should('be.visible')
|
|
.contains('Slab Thickness');
|
|
cy.get('@modeDropdown')
|
|
.should('be.visible')
|
|
.contains('MIP');
|
|
cy.get('@modeCheckbox').should('be.visible');
|
|
cy.get('@layoutBtn')
|
|
.should('be.visible')
|
|
.contains('Layout');
|
|
});
|
|
});
|