Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

VTK toolbar is not displayed if user clicks on 2D MPR button before image loads in viewport

Open mirnasilva opened this issue 7 years ago • 2 comments

Bug Report

Description

If user drags a thumbnail and clicks on 2D MPR button too fast, without waiting for the image to load on the single viewport the button Exit 2D MPR is displayed with the Cornerstone toolbar instead of the VTK toolbar.

This scenario is tricky to reproduce manually, but it is constantly falling on the test automation.

Steps to Reproduce

  1. Load studies for patient name: Juno
  2. Drag the 3rd thumbnail into the viewport
  3. Before waiting the image to load, click on button 2D MPR

Steps to Reproduce on Test Automation:

  1. Go to file platform/viewer/cypress/integration/pwa/OHIFExtensionVTK.spec.js
  2. Comment the command cy.wait(1000) in line 26.
  3. On terminal, navigate to path: Viewers/platform/viewer/
  4. Execute the test automation by running: yarn run test:e2e

Actual Result

The button Exit 2D MPR is displayed with the Cornerstone toolbar instead of the VTK toolbar.

Screen Shot 2019-11-12 at 17 58 37

Expected Result

The button Exit 2D MPR should only be displayed when the VTK tools are active and the viewport layout split into 3 viewports.

mirnasilva avatar Nov 12 '19 21:11 mirnasilva

@galelis I don't believe this is fixed by #1241. I am still able to reproduce. You'll see an error in the console: updateImage: image has not been loaded yet

image

The issue is, the button click updates state, but something is exiting early when we try to make the switch. Viewports show previous, but toolbar updates in response to the context change.

Not 100% sure why.

dannyrb avatar Dec 20 '19 21:12 dannyrb

Hi @dannyrb and @galelis , great job! Thanks! I did several tests and the bug mentioned in this issue is fixed. But I also found some others 🐛😄 The bugs found were described on #1326 . I'm moving this issue to Done.

mirnasilva avatar Dec 24 '19 01:12 mirnasilva