@@ -34,6 +34,9 @@ import zeebeModdleExtensions from 'zeebe-bpmn-moddle/resources/zeebe';
3434
3535import diagramXML from './UserTaskImplementationProps.bpmn' ;
3636
37+ const GROUP_SELECTOR = '[data-group-id="group-userTaskImplementation"]' ;
38+ const IMPLEMENTATION_SELECTOR = 'select[name=userTaskImplementation]' ;
39+
3740
3841describe ( 'provider/zeebe - UserTaskImplementationProps' , function ( ) {
3942
@@ -110,6 +113,9 @@ describe('provider/zeebe - UserTaskImplementationProps', function() {
110113 // then
111114 const implementation = getImplementationSelect ( container ) ;
112115 expect ( implementation . value ) . to . equal ( 'zeebeUserTask' ) ;
116+
117+ // and also
118+ return expectEdited ( container , true ) ;
113119 } ) ) ;
114120
115121
@@ -126,6 +132,9 @@ describe('provider/zeebe - UserTaskImplementationProps', function() {
126132 // then
127133 const implementation = getImplementationSelect ( container ) ;
128134 expect ( implementation . value ) . to . equal ( 'jobWorker' ) ;
135+
136+ // and also
137+ return expectEdited ( container , false ) ;
129138 } ) ) ;
130139
131140
@@ -223,11 +232,29 @@ describe('provider/zeebe - UserTaskImplementationProps', function() {
223232// helper /////////////////
224233
225234function getImplementationSelect ( container ) {
226- return domQuery ( 'select[name=userTaskImplementation]' , container ) ;
235+ return domQuery ( IMPLEMENTATION_SELECTOR , container ) ;
227236}
228237
229238function getZeebeUserTask ( element ) {
230239 const businessObject = getBusinessObject ( element ) ;
231240
232241 return getExtensionElementsList ( businessObject , 'zeebe:UserTask' ) [ 0 ] ;
233242}
243+
244+
245+ async function expectEdited ( container , exists ) {
246+
247+ await wait ( 50 ) ;
248+
249+ const indicator = domQuery ( `${ GROUP_SELECTOR } .bio-properties-panel-dot` , container ) ;
250+
251+ if ( exists ) {
252+ expect ( indicator ) . to . exist ;
253+ } else {
254+ expect ( indicator ) . not . to . exist ;
255+ }
256+ }
257+
258+ function wait ( ms ) {
259+ return new Promise ( resolve => setTimeout ( resolve , ms ) ) ;
260+ }
0 commit comments