@@ -114,7 +114,9 @@ describe('provider/zeebe - ScriptImplementationProps', function() {
114
114
// then
115
115
const implementation = getImplementationSelect ( container ) ;
116
116
expect ( implementation . value ) . to . equal ( '' ) ;
117
- expectEditedIndicator ( container ) . to . not . exist ;
117
+
118
+ // and also
119
+ return expectEdited ( container , false ) ;
118
120
} ) ) ;
119
121
120
122
@@ -131,7 +133,9 @@ describe('provider/zeebe - ScriptImplementationProps', function() {
131
133
// then
132
134
const implementation = getImplementationSelect ( container ) ;
133
135
expect ( implementation . value ) . to . equal ( 'script' ) ;
134
- expectEditedIndicator ( container ) . to . exist ;
136
+
137
+ // and also
138
+ return expectEdited ( container , true ) ;
135
139
} ) ) ;
136
140
137
141
@@ -148,7 +152,9 @@ describe('provider/zeebe - ScriptImplementationProps', function() {
148
152
// then
149
153
const implementation = getImplementationSelect ( container ) ;
150
154
expect ( implementation . value ) . to . equal ( 'jobWorker' ) ;
151
- expectEditedIndicator ( container ) . to . exist ;
155
+
156
+ // and also
157
+ return expectEdited ( container , true ) ;
152
158
} ) ) ;
153
159
154
160
@@ -172,7 +178,6 @@ describe('provider/zeebe - ScriptImplementationProps', function() {
172
178
173
179
const script = getScript ( scriptTask ) ;
174
180
expect ( script ) . to . not . exist ;
175
-
176
181
} ) ) ;
177
182
178
183
@@ -319,10 +324,18 @@ describe('provider/zeebe - ScriptImplementationProps', function() {
319
324
320
325
// helper /////////////////
321
326
322
- function expectEditedIndicator ( container ) {
327
+ async function expectEdited ( container , exists ) {
328
+ await new Promise ( resolve => {
329
+ setTimeout ( resolve , 0 ) ;
330
+ } ) ;
331
+
323
332
const indicator = domQuery ( `${ GROUP_SELECTOR } .bio-properties-panel-dot` , container ) ;
324
333
325
- return expect ( indicator ) ;
334
+ if ( exists ) {
335
+ expect ( indicator ) . to . exist ;
336
+ } else {
337
+ expect ( indicator ) . not . to . exist ;
338
+ }
326
339
}
327
340
328
341
function getImplementationSelect ( container ) {
0 commit comments