Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 1d5e561

Browse files
committed
More debug info about polygon emulation
1 parent 436b007 commit 1d5e561

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

e2e/tests/helpers.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,13 @@ const polygonKonva = async (points, done) => {
149149
}
150150

151151
// for closing the Polygon we should place cursor over the first point
152-
const firstPoint = stage.getIntersection({ x: firstCoords[0], y: firstCoords[1] });
153-
if (!firstPoint) return done("First point was not found");
152+
const [x, y] = firstCoords;
153+
const firstPoint = stage.getIntersection({ x, y });
154+
if (!firstPoint) {
155+
const getInfo = t => [t.className, t.x(), t.y()].join(" ");
156+
const allPoints = window.Konva.stages[0].find("Circle").map(getInfo);
157+
return done(`First point [${x}, ${y}] was not found (${allPoints})`);
158+
}
154159
firstPoint.fire("mouseover");
155160
await delay();
156161
// and only after that we can click on it

0 commit comments

Comments
 (0)