Merge pull request #16964 from timvandermeij/fix-intermittent-annotations-move

Fix off-by-one errors in the "FreeText must move several annotations" integration test
This commit is contained in:
Tim van der Meij 2023-09-17 17:46:19 +02:00 committed by GitHub
commit 97819891b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2254,12 +2254,12 @@ describe("FreeText Editor", () => {
return { x, y };
});
const oldPos = allPositions[i];
expect(Math.round(pos.x))
expect(Math.round(pos.x - oldPos.x))
.withContext(`In ${browserName}`)
.toEqual(Math.round(oldPos.x + 39));
expect(Math.round(pos.y))
.toEqual(39);
expect(Math.round(pos.y - oldPos.y))
.withContext(`In ${browserName}`)
.toEqual(Math.round(oldPos.y + 74));
.toEqual(74);
}
})
);