Skip to content

Commit

Permalink
fix: hide context pad when token simulation enabled
Browse files Browse the repository at this point in the history
Closes #185
  • Loading branch information
philippfromme authored and nikku committed Aug 16, 2024
1 parent e398b9b commit cc5bdd9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/css/bpmn-js-token-simulation.css
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
}

.bjs-container.simulation .djs-bendpoint,
.bjs-container.simulation .djs-context-pad,
.bjs-container.simulation .djs-outline,
.bjs-container.simulation .djs-palette,
.bjs-container.simulation .djs-resizer,
Expand Down
39 changes: 39 additions & 0 deletions test/spec/ModelerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,45 @@ describe('modeler extension', function() {
});


describe('UI', function() {

const diagram = require('./simple.bpmn');

beforeEach(bootstrapModeler(diagram, {
additionalModules: [
TokenSimulationModelerModules
]
}));


it('should hide UI', inject(function(canvas, toggleMode) {

// given
const ui = domQueryAll(`
.djs-bendpoint,
.djs-context-pad,
.djs-outline,
.djs-palette,
.djs-resizer,
.djs-segment-dragger
`, canvas.getContainer());

Array.from(ui).forEach(element => {
expect(window.getComputedStyle(element).display !== 'none').to.be.true;
});

// when
toggleMode.toggleMode();

// then
Array.from(ui).forEach(element => {
expect(window.getComputedStyle(element).display === 'none').to.be.true;
});
}));

});


describe('overlays', function() {

class FoobarOverlays {
Expand Down

0 comments on commit cc5bdd9

Please sign in to comment.