Repository: testing-library/user-event (TypeScript)

Issue:
14.4: pointermove events no longer trigger
### Reproduction example

https://codesandbox.io/s/userevent-touchmove-skz767?file=/src/App.test.js

### Prerequisites

1. Use version >= 14.4.0
2. Setup a page that listens to pointerdown and pointermove, and logs them.
3. Trigger pointer events in the test like the following:
```js
    const touchable = screen.getByTitle('container')
    await user.pointer([
      {
        keys: "[TouchA>]",
        target: touchable,
        coords: { x: 100, y: 100 },
      },
      {
        pointerName: "TouchA",
        target: touchable,
        coords: { x: 125, y: 100 },
      },
    ]);
```

### Expected behavior

The new coordinates from the second `pointermove` event should be logged. (125, 100)

### Actual behavior

The initial cordinate from the initial `pointerdown` event are logged. (100, 100)

### User-event version

14.4.0

### Environment

Testing Library framework: <!-- `@testing-library/react@12.1.3` -->
<!--
  This can also be @testing-library/dom, if you don't use any framework wrapper.
-->

JS framework: <!-- `react@17.0.2` -->

Test environment: <!-- `jest@27.5.1` -->
<!--
  Are you using Jest, Mocha, Puppeteer, Ava, Vitest, or something else?
  Which version are we dealing with?
-->

DOM implementation: <!-- `jsdom@19.0.0` -->
<!--
  Are you using Jsdom, a browser, or something else?

  Some test environments have a default DOM implementation, e.g. Jest ships with Jsdom.
  Please check your configuration.
-->


### Additional context

Works just fine on version 14.3.0


Discussion:
Thanks for the report :heart: 

There is a typo in the helper:
https://github.com/testing-library/user-event/blob/1aa2027e5ec445ab413808556efa7763b65053d3/src/system/pointer/shared.ts#L30-L31
@ph-fritsche any plan to fix this ?
I'm running into this bug as well. The `onMouseMove`  event is only called when the `y` coordinate changes. I guess I'll downgrade until this is fixed.
I dug in to this today and realised while there is a bug in the isDifferentPointerPosition util that wasn't what was causing our tests to fail in versions >= 14.4.0.

Our tests were all specified with clientX & clientY. Changing these to x and y respectively allows our tests to pass again.

Breaks in >= 14.4.0:

``` javascript
await user.pointer([
  {
    keys: '[MouseLeft>]',
    target: el,
    coords: { clientX: 100, clientY: 100 },
  },
  {
    coords: { clientX: 200, clientY: 200 },
  },
  {
    keys: '[/MouseLeft]',
  },
]);
```

Fixed in >= 14.4.0:

``` javascript
await user.pointer([
  {
    keys: '[MouseLeft>]',
    target: el,
    coords: { x: 100, y: 100 },
  },
  {
    coords: { x: 200, y: 200 },
  },
  {
    keys: '[/MouseLeft]',
  },
]);
```


:tada: This issue has been resolved in version 14.6.0 :tada:

The release is available on:
- [npm package (@latest dist-tag)](https://www.npmjs.com/package/@testing-library/user-event/v/14.6.0)
- [GitHub release](https://github.com/testing-library/user-event/releases/tag/v14.6.0)

Your **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package::rocket:



Patch:
diff --git a/src/system/pointer/shared.ts b/src/system/pointer/shared.ts
index 04ef8eda..a00bb441 100644
--- a/src/system/pointer/shared.ts
+++ b/src/system/pointer/shared.ts
@@ -27,7 +27,7 @@ export function isDifferentPointerPosition(
 ) {
   return (
     positionA.target !== positionB.target ||
-    positionA.coords?.x !== positionB.coords?.y ||
+    positionA.coords?.x !== positionB.coords?.x ||
     positionA.coords?.y !== positionB.coords?.y ||
     positionA.caret?.node !== positionB.caret?.node ||
     positionA.caret?.offset !== positionB.caret?.offset


Test patch:
diff --git a/tests/pointer/move.ts b/tests/pointer/move.ts
index 3c9ccc1e..24aabead 100644
--- a/tests/pointer/move.ts
+++ b/tests/pointer/move.ts
@@ -129,3 +129,24 @@ test('declare pointer coordinates', async () => {
     expect(getEvents('mouseover')[0]).toHaveProperty(prop, value)
   })
 })
+
+test('move pointer by x/y coords', async () => {
+  const {elements, getEventSnapshot, user} = setup('<div></div>')
+
+  await user.pointer([
+    {keys: '[MouseLeft>]', target: elements[0], coords: {x: 20, y: 20}},
+    {coords: {x: 40, y: 20}},
+    {coords: {x: 40, y: 40}},
+  ])
+
+  expect(getEventSnapshot()).toMatchInlineSnapshot(`
+    Events fired on: div
+
+    div - pointerdown
+    div - mousedown: primary
+    div - pointermove
+    div - mousemove
+    div - pointermove
+    div - mousemove
+  `)
+})