diff --git a/tests/library/tap.spec.ts b/tests/library/tap.spec.ts index d9c0479c1d72b..8ae521e111460 100644 --- a/tests/library/tap.spec.ts +++ b/tests/library/tap.spec.ts @@ -19,7 +19,9 @@ import type { ElementHandle } from 'playwright-core'; it.use({ hasTouch: true }); -it('TA-001 should send all of the correct events @smoke', async ({ page }) => { +it('TA-001 should send all of the correct events @smoke', { + annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/43569' }, +}, async ({ page }) => { await page.setContent(`
a
b
@@ -37,6 +39,14 @@ it('TA-001 should send all of the correct events @smoke', async ({ page }) => { 'mousemove', 'mousedown', 'mouseup', 'click', ]); + + await eventsHandle.evaluate(events => events.length = 0); + await page.locator('#b').evaluate(target => { + target.addEventListener('pointerdown', event => event.preventDefault(), { once: true }); + }); + await page.tap('#b'); + const events = (await eventsHandle.jsonValue()).filter(event => ['pointerdown', 'pointerup', 'mousedown', 'mouseup', 'click'].includes(event)); + expect(events).toEqual(['pointerdown', 'pointerup', 'click']); }); it('TA-002 trial run should not tap', async ({ page }) => {