feat: implement long press and double tap gestures

This commit is contained in:
张翔
2026-03-05 14:59:06 +08:00
parent 302fafef49
commit 12ff5fc1f3
2 changed files with 44 additions and 0 deletions
@@ -54,4 +54,24 @@ test.describe('GestureSimulator - Swipe', () => {
expect(transform).toBeTruthy();
});
test('should perform long press', async ({ page }) => {
await page.goto('/');
const simulator = new GestureSimulator(page);
const card = page.locator('.card').first();
await simulator.longPress(card, 1000);
await expect(card).toBeVisible();
});
test('should perform double tap', async ({ page }) => {
await page.goto('/products');
const simulator = new GestureSimulator(page);
const image = page.locator('.product-image').first();
await simulator.doubleTap(image);
await expect(image).toBeVisible();
});
});