diff --git a/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js b/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js index e0c509b972e..d6a7bb24d2a 100644 --- a/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js +++ b/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js @@ -442,7 +442,18 @@ describe('OHIF Cornerstone Toolbar', () => { cy.waitDicomImage(); // Now navigate down once and check that the left hand pane navigated - cy.get('body').type('{downarrow}'); + cy.get('body').focus().type('{downarrow}'); + + // The following lines assist in troubleshooting when/if this test were to fail. + cy.get('[data-cy="viewport-pane"]') + .eq(0) + .find('[data-cy="viewport-overlay-top-right"]') + .should('contains.text', 'I:2 (2/20)'); + cy.get('[data-cy="viewport-pane"]') + .eq(1) + .find('[data-cy="viewport-overlay-top-right"]') + .should('contains.text', 'I:2 (2/20)'); + cy.get('body').type('{leftarrow}'); cy.setLayout(1, 1); cy.get('@viewportInfoTopRight').should('contains.text', 'I:2 (2/20)'); diff --git a/platform/app/cypress/support/commands.js b/platform/app/cypress/support/commands.js index f1351eb0d64..58bcd192d5c 100644 --- a/platform/app/cypress/support/commands.js +++ b/platform/app/cypress/support/commands.js @@ -181,7 +181,7 @@ Cypress.Commands.add('expectMinimumThumbnails', (seriesToWait = 1) => { //Command to wait DICOM image to load into the viewport Cypress.Commands.add('waitDicomImage', (mode = '/basic-test', timeout = 50000) => { cy.window() - .its('cornerstone') + .its('cornerstone', { timeout: 30000 }) .should($cornerstone => { const enabled = $cornerstone.getEnabledElements(); if (enabled?.length) {