* feat: Context menu feat: Custom context menu Adding documentation PR updates * fix: Capture tool exception * PR updates * Add fully worked out examples in the basic test mode/extension * Fix the menu display * fix: Make the commands on clicks much more configurable * Wait for load before double clicking * docs * PR changes - nothing functional, just moving things endlessly * PR comments * PR changes - rename the default context menu * Renamed the cornerstoneContextMenu to measurementsContextMenu * Add chevron right to the sub-menus
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
describe('OHIF Context Menu', function () {
|
|
beforeEach(function () {
|
|
cy.checkStudyRouteInViewer(
|
|
'1.2.840.113619.2.5.1762583153.215519.978957063.78'
|
|
);
|
|
|
|
cy.expectMinimumThumbnails(3);
|
|
cy.initCommonElementsAliases();
|
|
cy.initCornerstoneToolsAliases();
|
|
cy.resetViewport().wait(50);
|
|
});
|
|
|
|
it('checks context menu customization', function () {
|
|
// Add length measurement
|
|
cy.addLengthMeasurement();
|
|
cy.get('[data-cy="prompt-begin-tracking-yes"]').click();
|
|
cy.get('[data-cy="measurement-item"]').click();
|
|
|
|
const [x1, y1] = [150, 100];
|
|
cy.get('@viewport')
|
|
.trigger('mousedown', x1, y1, {
|
|
which: 3,
|
|
})
|
|
.trigger('mouseup', x1, y1, {
|
|
which: 3,
|
|
});
|
|
|
|
// Contextmenu is visible
|
|
cy.get('[data-cy="context-menu"]').should('be.visible');
|
|
|
|
// Click "Finding" subMenu
|
|
cy.get('[data-cy="context-menu-item"]')
|
|
.contains('Finding')
|
|
.click();
|
|
|
|
// Click "Finding" subMenu
|
|
cy.get('[data-cy="context-menu-item"]')
|
|
.contains('Aortic insufficiency')
|
|
.click();
|
|
cy.get('[data-cy="measurement-item"]').contains('Aortic insufficiency');
|
|
});
|
|
});
|