@@ -341,11 +341,11 @@ describe('Feature: save annotations', () => {
341
341
zOrder : 0 ,
342
342
} ) ;
343
343
344
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
344
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
345
345
await task . annotations . put ( [ state ] ) ;
346
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
346
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
347
347
await task . annotations . save ( ) ;
348
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
348
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
349
349
annotations = await task . annotations . get ( 0 ) ;
350
350
expect ( annotations ) . toHaveLength ( length + 1 ) ;
351
351
} ) ;
@@ -354,23 +354,23 @@ describe('Feature: save annotations', () => {
354
354
const task = ( await window . cvat . tasks . get ( { id : 101 } ) ) [ 0 ] ;
355
355
const annotations = await task . annotations . get ( 0 ) ;
356
356
357
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
357
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
358
358
annotations [ 0 ] . occluded = true ;
359
359
await annotations [ 0 ] . save ( ) ;
360
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
360
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
361
361
await task . annotations . save ( ) ;
362
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
362
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
363
363
} ) ;
364
364
365
365
test ( 'delete & save annotations for a task' , async ( ) => {
366
366
const task = ( await window . cvat . tasks . get ( { id : 101 } ) ) [ 0 ] ;
367
367
const annotations = await task . annotations . get ( 0 ) ;
368
368
369
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
369
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
370
370
await annotations [ 0 ] . delete ( ) ;
371
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
371
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
372
372
await task . annotations . save ( ) ;
373
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
373
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
374
374
} ) ;
375
375
376
376
test ( 'create & save annotations for a job' , async ( ) => {
@@ -387,11 +387,11 @@ describe('Feature: save annotations', () => {
387
387
zOrder : 0 ,
388
388
} ) ;
389
389
390
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
390
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
391
391
await job . annotations . put ( [ state ] ) ;
392
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
392
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
393
393
await job . annotations . save ( ) ;
394
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
394
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
395
395
annotations = await job . annotations . get ( 0 ) ;
396
396
expect ( annotations ) . toHaveLength ( length + 1 ) ;
397
397
} ) ;
@@ -400,23 +400,23 @@ describe('Feature: save annotations', () => {
400
400
const job = ( await window . cvat . jobs . get ( { jobID : 100 } ) ) [ 0 ] ;
401
401
const annotations = await job . annotations . get ( 0 ) ;
402
402
403
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
403
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
404
404
annotations [ 0 ] . points = [ 0 , 100 , 200 , 300 ] ;
405
405
await annotations [ 0 ] . save ( ) ;
406
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
406
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
407
407
await job . annotations . save ( ) ;
408
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
408
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
409
409
} ) ;
410
410
411
411
test ( 'delete & save annotations for a job' , async ( ) => {
412
412
const job = ( await window . cvat . jobs . get ( { jobID : 100 } ) ) [ 0 ] ;
413
413
const annotations = await job . annotations . get ( 0 ) ;
414
414
415
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
415
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
416
416
await annotations [ 0 ] . delete ( ) ;
417
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
417
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
418
418
await job . annotations . save ( ) ;
419
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
419
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
420
420
} ) ;
421
421
422
422
test ( 'delete & save annotations for a job when there are a track and a shape with the same id' , async ( ) => {
@@ -658,11 +658,11 @@ describe('Feature: clear annotations', () => {
658
658
expect ( annotations . length ) . not . toBe ( 0 ) ;
659
659
annotations [ 0 ] . occluded = true ;
660
660
await annotations [ 0 ] . save ( ) ;
661
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
661
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
662
662
await task . annotations . clear ( true ) ;
663
663
annotations = await task . annotations . get ( 0 ) ;
664
664
expect ( annotations . length ) . not . toBe ( 0 ) ;
665
- expect ( await task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
665
+ expect ( task . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
666
666
} ) ;
667
667
668
668
test ( 'clear annotations with reload in a job' , async ( ) => {
@@ -671,11 +671,11 @@ describe('Feature: clear annotations', () => {
671
671
expect ( annotations . length ) . not . toBe ( 0 ) ;
672
672
annotations [ 0 ] . occluded = true ;
673
673
await annotations [ 0 ] . save ( ) ;
674
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
674
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( true ) ;
675
675
await job . annotations . clear ( true ) ;
676
676
annotations = await job . annotations . get ( 0 ) ;
677
677
expect ( annotations . length ) . not . toBe ( 0 ) ;
678
- expect ( await job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
678
+ expect ( job . annotations . hasUnsavedChanges ( ) ) . toBe ( false ) ;
679
679
} ) ;
680
680
681
681
test ( 'clear annotations with bad reload parameter' , async ( ) => {
0 commit comments