test: set right viewport when layout is decreased (#1146)

This commit is contained in:
Rodrigo Antinarelli 2019-11-02 08:26:24 -03:00 committed by Danny Brown
parent 621e63b3e1
commit 9dedccc7f9
2 changed files with 15 additions and 0 deletions

View File

@ -393,6 +393,20 @@ describe('OHIF Cornerstone Toolbar', () => {
});
});
it('checks if the available viewport was set to active when layout is decreased', () => {
cy.setLayout(3, 3);
// activate the ninth viewport
cy.get('[data-cy=viewport-container-8]')
.click()
.should('have.class', 'active');
cy.setLayout(1, 1);
// first viewport should be active
cy.get('[data-cy=viewport-container-0]').should('have.class', 'active');
});
it('checks if Clear tool will delete all measurements added in the viewport', () => {
//Add measurements in the viewport
cy.addLengthMeasurement();

View File

@ -35,6 +35,7 @@ const ViewportPane = function(props) {
propClassName
)}
ref={drop}
data-cy={`viewport-container-${viewportIndex}`}
>
{children}
</div>