Force tests to use mouse events instead of pointer events

The pointer events use a different mechanism for counting clicks that doesn't
work when the tests are run in a real browser like Chrome. This change forces
iD to always use mouse events during testing, even in a real browser.
This commit is contained in:
Bryan Housel
2021-08-18 18:55:28 -04:00
parent b2d18d1ebe
commit 08c765236f
2 changed files with 24 additions and 20 deletions
+1
View File
@@ -110,6 +110,7 @@ mocha.setup({
expect = chai.expect;
window.d3 = iD.d3; // Remove this if we can avoid exporting all of d3.js
delete window.PointerEvent; // force the brower to use mouse events
// Workaround for `Array.from` polyfill in PhantomJS
// https://github.com/openstreetmap/iD/issues/6087#issuecomment-476219308