Skip to content

Commit

Permalink
Adjust long touch recognition time
Browse files Browse the repository at this point in the history
  • Loading branch information
prushforth committed Oct 28, 2024
1 parent 2a79b26 commit 596c8b3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/e2e/core/touchDevice.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ test.describe('Playwright touch device tests', () => {
});

test('Tap/Long press to show layer control', async () => {
await page.pause();
const layerControl = await page.locator(
'div > div.leaflet-control-container > div.leaflet-top.leaflet-right > div'
);
Expand All @@ -43,16 +42,14 @@ test.describe('Playwright touch device tests', () => {
await viewer.tap({ position: { x: 150, y: 150 } });
await layerControl.tap();
await layerControl.dispatchEvent('touchstart');
await page.waitForTimeout(2000);
await page.waitForTimeout(1500);
await layerControl.dispatchEvent('touchend');
await page.waitForTimeout(2000);

className = await layerControl.evaluate(
(el) =>
el.classList.contains('leaflet-control-layers-expanded') &&
el._isExpanded
);
await page.waitForTimeout(2000);
expect(className).toEqual(true);

// expect the layer context menu not show after the long press
Expand Down

0 comments on commit 596c8b3

Please sign in to comment.