Viewers
Viewers copied to clipboard
Percy Snapshot resizes images in VTK and they doesn't fit the viewport
Bug Report
Describe the Bug
Due to Percy snapshot, the images inside the viewports are being resized (in VTK) and once the browser continues the test automation execution, the images are not centered in the viewport. To fix that, we need to reload the page before each test in cypress.
This issue is only reproducible on the test automation execution.
Steps to Reproduce
- To reproduce the issue on test automation, go to file:
platform/viewer/cypress/integration/pwa/OHIFExtensionVTK.spec.js - Replace the functions
before()andbeforeEach()by the following code:
before(() => {
cy.openStudy('Juno');
cy.waitDicomImage();
cy.expectMinimumThumbnails(7);
//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');
});
//drag thumbnail
cy.get('[data-cy="thumbnail-list"]')
.contains('CT WB 5.0 B35f')
.drag('.viewport-drop-target')
.wait(1000);
//Select 2D MPR button
cy.get('.PluginSwitch > .toolbar-button').click();
//Wait Reformatting Images
cy.waitVTKReformatting();
});
beforeEach(() => {
cy.initVTKToolsAliases();
});
I tried to reproduce the issue again without reloading the page and I was not able to see it happening. I think it worth the investigation just to be sure if it is really happening or not.
I'm unable to reproduce. If someone else reports, more than happy to reopen this issue.