@@ -462,8 +462,8 @@ test.describe('Popup Geometry',
462
462
// Get default buffer with one point
463
463
let buffer = await page . screenshot ( { clip :{ x :425 , y :325 , width :100 , height :100 } } ) ;
464
464
const defaultByteLength = buffer . byteLength ;
465
- await expect ( defaultByteLength ) . toBeGreaterThan ( 900 ) ; // 906
466
- await expect ( defaultByteLength ) . toBeLessThan ( 1000 ) // 906
465
+ expect ( defaultByteLength ) . toBeGreaterThan ( 800 ) ; // 851
466
+ expect ( defaultByteLength ) . toBeLessThan ( 900 ) // 851
467
467
468
468
// Click on a point
469
469
let getFeatureInfoPromise = project . waitForGetFeatureInfoRequest ( ) ;
@@ -473,23 +473,21 @@ test.describe('Popup Geometry',
473
473
474
474
// The geometry is displayed
475
475
buffer = await page . screenshot ( { clip :{ x :425 , y :325 , width :100 , height :100 } } ) ;
476
- await expect ( buffer . byteLength ) . not . toBe ( defaultByteLength ) ;
477
- await expect ( buffer . byteLength ) . toBeGreaterThan ( defaultByteLength ) ;
476
+ expect ( buffer . byteLength ) . toBeGreaterThan ( defaultByteLength ) ;
478
477
479
478
// Close popup
480
479
page . locator ( '#button-popupcontent' ) . click ( ) ;
481
480
await page . waitForTimeout ( 50 ) ;
482
481
483
482
buffer = await page . screenshot ( { clip :{ x :425 , y :325 , width :100 , height :100 } } ) ;
484
- await expect ( buffer . byteLength ) . toBe ( defaultByteLength ) ;
483
+ expect ( buffer . byteLength ) . toBe ( defaultByteLength ) ;
485
484
486
485
// Open popup
487
486
page . locator ( '#button-popupcontent' ) . click ( ) ;
488
- await page . waitForTimeout ( 50 ) ;
487
+ await page . waitForTimeout ( 100 ) ;
489
488
490
489
buffer = await page . screenshot ( { clip :{ x :425 , y :325 , width :100 , height :100 } } ) ;
491
- await expect ( buffer . byteLength ) . not . toBe ( defaultByteLength ) ;
492
- await expect ( buffer . byteLength ) . toBeGreaterThan ( defaultByteLength ) ;
490
+ expect ( buffer . byteLength ) . toBeGreaterThan ( defaultByteLength ) ;
493
491
} ) ;
494
492
495
493
test ( 'Show/hide the geometry on click on the map' , async ( { page } ) => {
@@ -499,8 +497,8 @@ test.describe('Popup Geometry',
499
497
// Get default buffer with one point
500
498
let buffer = await page . screenshot ( { clip :{ x :425 , y :325 , width :100 , height :100 } } ) ;
501
499
const defaultByteLength = buffer . byteLength ;
502
- await expect ( defaultByteLength ) . toBeGreaterThan ( 900 ) ; // 906
503
- await expect ( defaultByteLength ) . toBeLessThan ( 1000 ) // 906
500
+ expect ( defaultByteLength ) . toBeGreaterThan ( 800 ) ; // 851
501
+ expect ( defaultByteLength ) . toBeLessThan ( 900 ) // 851
504
502
505
503
// Click on a point
506
504
let getFeatureInfoPromise = project . waitForGetFeatureInfoRequest ( ) ;
@@ -510,8 +508,7 @@ test.describe('Popup Geometry',
510
508
511
509
// The geometry is displayed
512
510
buffer = await page . screenshot ( { clip :{ x :425 , y :325 , width :100 , height :100 } } ) ;
513
- await expect ( buffer . byteLength ) . not . toBe ( defaultByteLength ) ;
514
- await expect ( buffer . byteLength ) . toBeGreaterThan ( defaultByteLength ) ;
511
+ expect ( buffer . byteLength ) . toBeGreaterThan ( defaultByteLength ) ;
515
512
516
513
// Not click on a point
517
514
getFeatureInfoPromise = project . waitForGetFeatureInfoRequest ( ) ;
@@ -522,7 +519,7 @@ test.describe('Popup Geometry',
522
519
523
520
// Nothing
524
521
buffer = await page . screenshot ( { clip :{ x :425 , y :325 , width :100 , height :100 } } ) ;
525
- await expect ( buffer . byteLength ) . toBe ( defaultByteLength ) ;
522
+ expect ( buffer . byteLength ) . toBe ( defaultByteLength ) ;
526
523
} ) ;
527
524
} ) ;
528
525
0 commit comments