Skip to content

Commit

Permalink
tests: fix touch test issue
Browse files Browse the repository at this point in the history
* fix selector issue to continuously track the dragging child.
  • Loading branch information
yookoala committed Nov 16, 2023
1 parent 1a41fc1 commit 2f75467
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/example1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ describe('Touch drag drop', () => {
await dispatchTouchEvent(
page,
'touchmove',
'dragdrop-child',
'dragdrop-child[dragging=true]',
[{ pageX: 400, pageY: 400 }],
);
await page.screenshot({ path: `${testInfo.outputPath()}/${step++}-after-drag.png` });
Expand All @@ -374,14 +374,15 @@ describe('Touch drag drop', () => {
await dispatchTouchEvent(
page,
'touchmove',
'dragdrop-child',
'dragdrop-child[dragging=true]',
[{ pageX: 652, pageY: 75 }],
);
await page.screenshot({ path: `${testInfo.outputPath()}/${step++}-after-drag.png` });

await dispatchTouchEvent(
page,
'touchend',
'dragdrop-child',
'dragdrop-child[dragging=true]',
[],
[],
[{ pageX: 652, pageY: 75 }],
Expand Down

0 comments on commit 2f75467

Please sign in to comment.