Skip to content

Commit

Permalink
fix: subscription coorelation key tooltip added
Browse files Browse the repository at this point in the history
Related to camunda-modeler: #4833
  • Loading branch information
abdul99ahad committed Feb 19, 2025
1 parent 0526f15 commit b5ae1e4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/contextProvider/zeebe/TooltipProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,19 @@ const TooltipProvider = {
</div>
);
},
'messageSubscriptionCorrelationKey': (element) => {
const translate = useService('translate');

return (
<div>
<p>
{ translate('Use the correlation key to correlate the message with a process instance (e.g. ')}<code>= orderId</code>{translate('). ')}
<a href="https://docs.camunda.io/docs/8.7/components/modeler/bpmn/message-events/#messages" target="_blank" rel="noopener noreferrer" title={ translate('Subscription correlation key documentation') }>
{ translate('Learn more.') }
</a> </p>
</div>
);
}
};

export default TooltipProvider;
26 changes: 24 additions & 2 deletions test/spec/provider/zeebe/MessageProps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ describe('provider/zeebe - MessageProps', function() {
clock.restore();
});

function openTooltip() {
function openTooltip(customWrapper = null) {
return act(() => {
const wrapper = domQuery('.bio-properties-panel-tooltip-wrapper', container);
const wrapper = customWrapper || domQuery('.bio-properties-panel-tooltip-wrapper', container);
mouseEnter(wrapper);
clock.tick(200);
});
Expand Down Expand Up @@ -544,6 +544,28 @@ describe('provider/zeebe - MessageProps', function() {
expect(documentationLinkGroups[1].title).to.equal('Receive task documentation');
}));


it('should display correct documentation for subscription correlation key', inject(async function(elementRegistry, selection) {

// given
const messageEvent = elementRegistry.get('IntermediateEvent_1');

await act(() => {
selection.select(messageEvent);
});

const susbscriptionKeyWrapper = domQuery('label[for="bio-properties-panel-messageSubscriptionCorrelationKey"] div', container);

Check failure on line 558 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, diagram-js@11.9 bpmn-js@11.5)

Trailing spaces not allowed

Check failure on line 558 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, @bpmn-io/properties-panel@3)

Trailing spaces not allowed

Check failure on line 558 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (false)

Trailing spaces not allowed

Check failure on line 558 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, diagram-js@11.9 bpmn-js@11.5)

Trailing spaces not allowed

Check failure on line 558 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, @bpmn-io/properties-panel@3)

Trailing spaces not allowed

Check failure on line 558 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (false)

Trailing spaces not allowed
//when

Check failure on line 559 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, diagram-js@11.9 bpmn-js@11.5)

Expected space or tab after '//' in comment

Check failure on line 559 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, @bpmn-io/properties-panel@3)

Expected space or tab after '//' in comment

Check failure on line 559 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (false)

Expected space or tab after '//' in comment

Check failure on line 559 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, diagram-js@11.9 bpmn-js@11.5)

Expected space or tab after '//' in comment

Check failure on line 559 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (true, @bpmn-io/properties-panel@3)

Expected space or tab after '//' in comment

Check failure on line 559 in test/spec/provider/zeebe/MessageProps.spec.js

View workflow job for this annotation

GitHub Actions / Build (false)

Expected space or tab after '//' in comment
await openTooltip(susbscriptionKeyWrapper);

const documentationLinkGroup = domQuery('.bio-properties-panel-tooltip-content a', container);

// then
expect(documentationLinkGroup).to.exist;
expect(documentationLinkGroup.title).to.equal('Subscription correlation key documentation');
}));

});

});
Expand Down

0 comments on commit b5ae1e4

Please sign in to comment.