@@ -34,8 +34,11 @@ import zeebeModdleExtensions from 'zeebe-bpmn-moddle/resources/zeebe';
3434
3535import diagramXML from './BusinessRuleImplementationProps.bpmn' ;
3636
37+ const GROUP_SELECTOR = '[data-group-id="group-businessRuleImplementation"]' ;
38+ const IMPLEMENTATION_SELECTOR = 'select[name=businessRuleImplementation]' ;
3739
38- describe ( 'provider/zeebe - TargetProps' , function ( ) {
40+
41+ describe ( 'provider/zeebe - BusinessRuleImplementationProps' , function ( ) {
3942
4043 const testModules = [
4144 BpmnPropertiesPanel ,
@@ -110,6 +113,9 @@ describe('provider/zeebe - TargetProps', function() {
110113 // then
111114 const implementation = getImplementationSelect ( container ) ;
112115 expect ( implementation . value ) . to . equal ( '' ) ;
116+
117+ // and also
118+ return expectEdited ( container , false ) ;
113119 } ) ) ;
114120
115121
@@ -126,6 +132,9 @@ describe('provider/zeebe - TargetProps', function() {
126132 // then
127133 const implementation = getImplementationSelect ( container ) ;
128134 expect ( implementation . value ) . to . equal ( 'dmn' ) ;
135+
136+ // and also
137+ return expectEdited ( container , true ) ;
129138 } ) ) ;
130139
131140
@@ -142,6 +151,9 @@ describe('provider/zeebe - TargetProps', function() {
142151 // then
143152 const implementation = getImplementationSelect ( container ) ;
144153 expect ( implementation . value ) . to . equal ( 'jobWorker' ) ;
154+
155+ // and also
156+ return expectEdited ( container , true ) ;
145157 } ) ) ;
146158
147159
@@ -334,7 +346,7 @@ describe('provider/zeebe - TargetProps', function() {
334346// helper /////////////////
335347
336348function getImplementationSelect ( container ) {
337- return domQuery ( 'select[name=businessRuleImplementation]' , container ) ;
349+ return domQuery ( IMPLEMENTATION_SELECTOR , container ) ;
338350}
339351
340352function getTaskDefinition ( element ) {
@@ -354,3 +366,20 @@ function getTaskHeaders(element) {
354366
355367 return getExtensionElementsList ( businessObject , 'zeebe:TaskHeaders' ) [ 0 ] ;
356368}
369+
370+ async function expectEdited ( container , exists ) {
371+
372+ await wait ( 50 ) ;
373+
374+ const indicator = domQuery ( `${ GROUP_SELECTOR } .bio-properties-panel-dot` , container ) ;
375+
376+ if ( exists ) {
377+ expect ( indicator ) . to . exist ;
378+ } else {
379+ expect ( indicator ) . not . to . exist ;
380+ }
381+ }
382+
383+ function wait ( ms ) {
384+ return new Promise ( resolve => setTimeout ( resolve , ms ) ) ;
385+ }
0 commit comments