feat: Allow configurable context menus (#2894)
* 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
This commit is contained in:
1 parent
4e94b588a7
commit
bc642fd2b6
40 files changed
+1472
-280
No files matched your search
+42
@@ -0,0 +1,42 @@
|
||||
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');
|
||||
});
|
||||
});
|
||||
@@ -52,7 +52,7 @@ describe('OHIF Study Viewer Page', function() {
|
||||
|
||||
it('performs double-click to load thumbnail in active viewport', () => {
|
||||
// Have to finish rendering the image before this works
|
||||
cy.wait(250);
|
||||
cy.wait(350);
|
||||
cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)').dblclick();
|
||||
|
||||
//cy.get('@viewportInfoBottomLeft').should('contains.text', expectedText);
|
||||
|
||||
Reference in new issue
Block a user