@@ -34,6 +34,9 @@ import zeebeModdleExtensions from 'zeebe-bpmn-moddle/resources/zeebe';
34
34
35
35
import diagramXML from './UserTaskImplementationProps.bpmn' ;
36
36
37
+ const GROUP_SELECTOR = '[data-group-id="group-userTaskImplementation"]' ;
38
+ const IMPLEMENTATION_SELECTOR = 'select[name=userTaskImplementation]' ;
39
+
37
40
38
41
describe ( 'provider/zeebe - UserTaskImplementationProps' , function ( ) {
39
42
@@ -110,6 +113,9 @@ describe('provider/zeebe - UserTaskImplementationProps', function() {
110
113
// then
111
114
const implementation = getImplementationSelect ( container ) ;
112
115
expect ( implementation . value ) . to . equal ( 'zeebeUserTask' ) ;
116
+
117
+ // and also
118
+ return expectEdited ( container , true ) ;
113
119
} ) ) ;
114
120
115
121
@@ -126,6 +132,9 @@ describe('provider/zeebe - UserTaskImplementationProps', function() {
126
132
// then
127
133
const implementation = getImplementationSelect ( container ) ;
128
134
expect ( implementation . value ) . to . equal ( 'jobWorker' ) ;
135
+
136
+ // and also
137
+ return expectEdited ( container , false ) ;
129
138
} ) ) ;
130
139
131
140
@@ -223,11 +232,29 @@ describe('provider/zeebe - UserTaskImplementationProps', function() {
223
232
// helper /////////////////
224
233
225
234
function getImplementationSelect ( container ) {
226
- return domQuery ( 'select[name=userTaskImplementation]' , container ) ;
235
+ return domQuery ( IMPLEMENTATION_SELECTOR , container ) ;
227
236
}
228
237
229
238
function getZeebeUserTask ( element ) {
230
239
const businessObject = getBusinessObject ( element ) ;
231
240
232
241
return getExtensionElementsList ( businessObject , 'zeebe:UserTask' ) [ 0 ] ;
233
242
}
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