test: set right viewport when layout is decreased (#1146)
This commit is contained in:
parent
621e63b3e1
commit
9dedccc7f9
@ -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', () => {
|
it('checks if Clear tool will delete all measurements added in the viewport', () => {
|
||||||
//Add measurements in the viewport
|
//Add measurements in the viewport
|
||||||
cy.addLengthMeasurement();
|
cy.addLengthMeasurement();
|
||||||
|
|||||||
@ -35,6 +35,7 @@ const ViewportPane = function(props) {
|
|||||||
propClassName
|
propClassName
|
||||||
)}
|
)}
|
||||||
ref={drop}
|
ref={drop}
|
||||||
|
data-cy={`viewport-container-${viewportIndex}`}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user