File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ test.describe('Playwright touch device tests', () => {
1919 } ) ;
2020
2121 test ( 'Tap/Long press to show layer control' , async ( ) => {
22- await page . pause ( ) ;
2322 const layerControl = await page . locator (
2423 'div > div.leaflet-control-container > div.leaflet-top.leaflet-right > div'
2524 ) ;
@@ -42,17 +41,13 @@ test.describe('Playwright touch device tests', () => {
4241 const viewer = await page . locator ( 'mapml-viewer' ) ;
4342 await viewer . tap ( { position : { x : 150 , y : 150 } } ) ;
4443 await layerControl . tap ( ) ;
45- await layerControl . dispatchEvent ( 'touchstart' ) ;
46- await page . waitForTimeout ( 2000 ) ;
47- await layerControl . dispatchEvent ( 'touchend' ) ;
48- await page . waitForTimeout ( 2000 ) ;
44+ await layerControl . tap ( { delay : 800 } ) ; // Simulates a long tap/press
4945
5046 className = await layerControl . evaluate (
5147 ( el ) =>
5248 el . classList . contains ( 'leaflet-control-layers-expanded' ) &&
5349 el . _isExpanded
5450 ) ;
55- await page . waitForTimeout ( 2000 ) ;
5651 expect ( className ) . toEqual ( true ) ;
5752
5853 // expect the layer context menu not show after the long press
You can’t perform that action at this time.
0 commit comments