Skip to content

Commit

Permalink
feat: show documentation field for templated elements
Browse files Browse the repository at this point in the history
  • Loading branch information
marstamm committed Jan 16, 2024
1 parent 58a2dd5 commit 80321e3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const LOWER_PRIORITY = 300;

const ALWAYS_DISPLAYED_GROUPS = [
'general',
'documentation',
'multiInstance'
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ describe('provider/cloud-element-templates - ElementTemplates', function() {
}));


it('should show only general group, and template-related entries when entriesVisible is unset',
it('should show only general and documentation group, and template-related entries when entriesVisible is unset',
inject(async function(elementRegistry, selection) {

// given
Expand All @@ -213,13 +213,14 @@ describe('provider/cloud-element-templates - ElementTemplates', function() {
// then
expectOnlyGroups(container, [
'general',
'documentation',
'ElementTemplates__Template'
]);
})
);


it('should show only general group, and template-related entries when entriesVisible=false',
it('should show only general and documentation group, and template-related entries when entriesVisible=false',
inject(async function(elementRegistry, selection) {

// given
Expand All @@ -233,13 +234,14 @@ describe('provider/cloud-element-templates - ElementTemplates', function() {
// then
expectOnlyGroups(container, [
'general',
'documentation',
'ElementTemplates__Template'
]);
})
);


it('should show only general group, and template group when template is unknown',
it('should show only general and documentation group, and template group when template is unknown',
inject(async function(elementRegistry, selection) {

// given
Expand All @@ -253,6 +255,7 @@ describe('provider/cloud-element-templates - ElementTemplates', function() {
// then
expectOnlyGroups(container, [
'general',
'documentation',
'ElementTemplates__Template'
]);
})
Expand Down Expand Up @@ -737,7 +740,32 @@ describe('provider/cloud-element-templates - ElementTemplates', function() {
expect(group).to.exist;
})
);

});


describe('documentation', function() {

it('should display documentation section', inject(
async function(elementRegistry, selection, modeling, bpmnFactory) {

// given
const element = elementRegistry.get('Task_1');

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

// then
const group = domQuery('[data-group-id="group-documentation"]', container);

expect(group).to.exist;
})
);

});

});


Expand Down

0 comments on commit 80321e3

Please sign in to comment.