Skip to content

Commit

Permalink
test: remove redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Feb 27, 2024
1 parent 32e3dd0 commit 0540c55
Showing 1 changed file with 0 additions and 241 deletions.
241 changes: 0 additions & 241 deletions test/spec/provider/zeebe/OutputPropagationProps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,247 +325,6 @@ describe('provider/zeebe - OutputPropagationProps', function() {

describe('integration', function() {

describe('remove zeebe:outputParameters', function() {

describe('when toggling on with zeebe:outputParameters and zeebe:inputParameters', function() {

let callActivity;


describe('zeebe:propagateAllChildVariables explicitly set', function() {

beforeEach(inject(async function(elementRegistry, selection) {

// given
callActivity = elementRegistry.get('CallActivity_6');

// when
await act(() => {
selection.select(callActivity);
});

const slider = domQuery('[data-entry-id=propagateAllChildVariables] .bio-properties-panel-toggle-switch__slider', container);

clickInput(slider);
}));


it('should execute', function() {

// then
const outputParameters = getOutputParameters(callActivity);

expect(outputParameters).to.have.length(0);
});


it('should undo', inject(function(commandStack) {

// when
commandStack.undo();

// then
const outputParameters = getOutputParameters(callActivity);

expect(outputParameters).to.exist;
expect(outputParameters).to.have.length(1);
}));


it('should undo/redo', inject(function(commandStack) {

// when
commandStack.undo();
commandStack.redo();

// then
const outputParameters = getOutputParameters(callActivity);

expect(outputParameters).to.have.length(0);
}));

});


describe('zeebe:propagateAllChildVariables not explicitly set (legacy bpmn:CallActivity)', function() {

beforeEach(inject(async function(selection, elementRegistry) {

// given
callActivity = elementRegistry.get('CallActivity_4');

// when
await act(() => {
selection.select(callActivity);
});

const slider = domQuery('[data-entry-id=propagateAllChildVariables] .bio-properties-panel-toggle-switch__slider', container);

clickInput(slider);
}));


it('should execute', function() {

// then
const outputParameters = getOutputParameters(callActivity);

expect(outputParameters).to.have.length(0);
});


it('should undo', inject(function(commandStack) {

// when
commandStack.undo();

// then
const outputParameters = getOutputParameters(callActivity);

expect(outputParameters).to.exist;
expect(outputParameters).to.have.length(1);
}));


it('should undo/redo', inject(function(commandStack) {

// when
commandStack.undo();
commandStack.redo();

// then
const outputParameters = getOutputParameters(callActivity);

expect(outputParameters).to.have.length(0);
}));

});

});

});


describe('remove zeebe:IoMapping', function() {

describe('when toggling on with outputParameters', function() {

let shape;

describe('<propagateAllChildVariables> explicitly set', function() {

beforeEach(inject(async function(selection, elementRegistry) {

// given
shape = elementRegistry.get('CallActivity_6');

// when
await act(() => {
selection.select(shape);
});

const slider = domQuery('[data-entry-id=propagateAllChildVariables] .bio-properties-panel-toggle-switch__slider', container);

clickInput(slider);
}));


it('should execute', function() {

// then
const inputOutput = getIoMapping(shape);
expect(inputOutput).not.to.exist;
});


it('should undo', inject(function(commandStack) {

// when
commandStack.undo();

// then
const outputParameters = getOutputParameters(shape);
expect(outputParameters).to.exist;
expect(outputParameters.length).to.equal(1);

const inputOutput = getIoMapping(shape);
expect(inputOutput).to.exist;
}));


it('should undo/redo', inject(function(commandStack) {

// when
commandStack.undo();
commandStack.redo();

// then
const inputOutput = getIoMapping(shape);
expect(inputOutput).not.to.exist;
}));

});


describe('<propagateAllChildVariables> not explicitly set (legacy callActivity)', function() {

beforeEach(inject(async function(selection, elementRegistry) {

// given
shape = elementRegistry.get('CallActivity_4');

// when
await act(() => {
selection.select(shape);
});

const slider = domQuery('[data-entry-id=propagateAllChildVariables] .bio-properties-panel-toggle-switch__slider', container);

clickInput(slider);
}));


it('should execute', function() {

// then
const inputOutput = getIoMapping(shape);
expect(inputOutput).not.to.exist;
});


it('should undo', inject(function(commandStack) {

// when
commandStack.undo();

// then
const outputParameters = getOutputParameters(shape);
expect(outputParameters).to.exist;
expect(outputParameters.length).to.equal(1);

const inputOutput = getIoMapping(shape);
expect(inputOutput).to.exist;
}));


it('should undo/redo', inject(function(commandStack) {

// when
commandStack.undo();
commandStack.redo();

// then
const inputOutput = getIoMapping(shape);
expect(inputOutput).not.to.exist;
}));

});

});

});


describe('set zeebe:propagateAllChildVariables to false', function() {

describe('when adding output parameters', function() {
Expand Down

0 comments on commit 0540c55

Please sign in to comment.