feat: implement long press and double tap gestures
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user