Merge pull request #1201 from eoghanmurray/pointerTypeFixups

Pointer type fixups
This commit is contained in:
Eoghan Murray
2026-04-01 12:00:00 +08:00
committed by GitHub
6 changed files with 430 additions and 56 deletions

View File

@@ -62,6 +62,29 @@ describe('record integration tests', function (this: ISuite) {
server.close();
});
it('can record clicks', async () => {
const page: puppeteer.Page = await browser.newPage();
await page.goto('about:blank');
await page.setContent(getHtml.call(this, 'link.html'));
await page.click('span');
// also tap on the span
const span = await page.waitForSelector('span');
const center = await page.evaluate((el) => {
const { x, y, width, height } = el.getBoundingClientRect();
return {
x: Math.round(x + width / 2),
y: Math.round(y + height / 2),
};
}, span);
await page.touchscreen.tap(center.x, center.y);
await page.click('a');
const snapshots = await page.evaluate('window.snapshots');
assertSnapshot(snapshots);
});
it('can record form interactions', async () => {
const page: puppeteer.Page = await browser.newPage();
await page.goto('about:blank');