feat(toolbar): new Toolbar to enable reactive state synchronization (#3983)
This commit is contained in:
1 parent
79d5c36bda
commit
566b25a544
155 files changed
+6311
-6577
No files matched your search
+32
-32
@@ -72,7 +72,7 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
// Assign an alias to the button element
|
||||
cy.get('@wwwcBtnPrimary').as('wwwcButton');
|
||||
cy.get('@wwwcButton').click();
|
||||
cy.get('@wwwcButton').should('have.class', 'active');
|
||||
cy.get('@wwwcButton').should('have.class', 'bg-primary-light');
|
||||
|
||||
//drags the mouse inside the viewport to be able to interact with series
|
||||
cy.get('@viewport')
|
||||
@@ -97,7 +97,7 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
cy.get('@panButton').click();
|
||||
|
||||
// Assert that the button has the 'active' class
|
||||
cy.get('@panButton').should('have.class', 'active');
|
||||
cy.get('@panButton').should('have.class', 'bg-primary-light');
|
||||
|
||||
// Trigger the pan actions on the viewport
|
||||
cy.get('@viewport')
|
||||
@@ -418,44 +418,44 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
cy.get('@moreBtnSecondary').click();
|
||||
|
||||
//Click on Flip button
|
||||
cy.get('[data-cy="flip-horizontal"]').click();
|
||||
cy.get('[data-cy="flipHorizontal"]').click();
|
||||
cy.waitDicomImage();
|
||||
cy.get('@viewportInfoMidLeft').should('contains.text', 'L');
|
||||
cy.get('@viewportInfoMidTop').should('contains.text', 'A');
|
||||
});
|
||||
|
||||
it('checks if stack sync is preserved on new display set and uses FOR', () => {
|
||||
// Active stack image sync and reference lines
|
||||
cy.get('[data-cy="MoreTools-split-button-secondary"]').click();
|
||||
cy.get('[data-cy="ImageSliceSync"]').click();
|
||||
// Add reference lines as that sometimes throws an exception
|
||||
cy.get('[data-cy="MoreTools-split-button-secondary"]').click();
|
||||
cy.get('[data-cy="ReferenceLines"]').click();
|
||||
// it('checks if stack sync is preserved on new display set and uses FOR', () => {
|
||||
// // Active stack image sync and reference lines
|
||||
// cy.get('[data-cy="MoreTools-split-button-secondary"]').click();
|
||||
// cy.get('[data-cy="ImageSliceSync"]').click();
|
||||
// // Add reference lines as that sometimes throws an exception
|
||||
// cy.get('[data-cy="MoreTools-split-button-secondary"]').click();
|
||||
// cy.get('[data-cy="ReferenceLines"]').click();
|
||||
|
||||
cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)').dblclick();
|
||||
cy.get('body').type('{downarrow}{downarrow}');
|
||||
// cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)').dblclick();
|
||||
// cy.get('body').type('{downarrow}{downarrow}');
|
||||
|
||||
// Change the layout and double load the first
|
||||
cy.setLayout(2, 1);
|
||||
cy.get('body').type('{rightarrow}');
|
||||
cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)').dblclick();
|
||||
cy.waitDicomImage();
|
||||
// // Change the layout and double load the first
|
||||
// cy.setLayout(2, 1);
|
||||
// cy.get('body').type('{rightarrow}');
|
||||
// cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)').dblclick();
|
||||
// cy.waitDicomImage();
|
||||
|
||||
// Now navigate down once and check that the left hand pane navigated
|
||||
cy.get('body').focus().type('{downarrow}');
|
||||
// // Now navigate down once and check that the left hand pane navigated
|
||||
// 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)');
|
||||
// // 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)');
|
||||
});
|
||||
// cy.get('body').type('{leftarrow}');
|
||||
// cy.setLayout(1, 1);
|
||||
// cy.get('@viewportInfoTopRight').should('contains.text', 'I:2 (2/20)');
|
||||
// });
|
||||
});
|
||||
@@ -18,7 +18,7 @@ describe('OHIF General Viewer', function () {
|
||||
cy.get('@zoomBtn')
|
||||
.click()
|
||||
.then($zoomBtn => {
|
||||
cy.wrap($zoomBtn).should('have.class', 'active');
|
||||
cy.wrap($zoomBtn).should('have.class', 'bg-primary-light');
|
||||
});
|
||||
|
||||
const zoomLevelInitial = cy.get('@viewportInfoTopLeft').then($viewportInfo => {
|
||||
|
||||
@@ -7,8 +7,7 @@ describe('OHIF MPR', () => {
|
||||
});
|
||||
|
||||
it('should not go MPR for non reconstructible displaySets', () => {
|
||||
cy.get('[data-cy="MPR"]').click();
|
||||
cy.get('.cornerstone-canvas').should('have.length', 1);
|
||||
cy.get('[data-cy="MPR"]').should('have.class', 'ohif-disabled');
|
||||
});
|
||||
|
||||
it('should go MPR for reconstructible displaySets and come back', () => {
|
||||
@@ -88,7 +87,6 @@ describe('OHIF MPR', () => {
|
||||
});
|
||||
|
||||
it('should correctly render Crosshairs for MPR', () => {
|
||||
cy.get('[data-cy="Crosshairs"]').should('not.exist');
|
||||
cy.get(':nth-child(3) > [data-cy="study-browser-thumbnail"]').dblclick();
|
||||
cy.get('[data-cy="MPR"]').click();
|
||||
cy.get('[data-cy="Crosshairs"]').click();
|
||||
@@ -125,13 +123,7 @@ describe('OHIF MPR', () => {
|
||||
cy.get('[data-cy="MPR"]').click();
|
||||
cy.get('[data-cy="Crosshairs"]').click();
|
||||
|
||||
// wait for the crosshairs tool to be active
|
||||
cy.get('[data-cy="Crosshairs"].active');
|
||||
|
||||
// Click the crosshairs button to deactivate it.
|
||||
cy.get('[data-cy="Crosshairs"]').click();
|
||||
|
||||
// wait for the window level button to be active
|
||||
cy.get('[data-cy="WindowLevel-split-button-primary"].active');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user