-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c8f01a
commit 0ecece9
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,8 +77,8 @@ describe("cy.realTouch", () => { | |
.then(($button) => { | ||
$button.get(0).addEventListener("pointerdown", (event) => { | ||
const rect = (event.currentTarget as HTMLElement).getBoundingClientRect() | ||
expect(event.clientX).to.be.closeTo(rect.left - 5, 0.1); | ||
expect(event.clientY).to.be.closeTo(rect.top, 0.1); | ||
expect(event.clientX).to.be.closeTo(rect.left - 5, 5); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dmtrKovalenko
Author
Owner
|
||
expect(event.clientY).to.be.closeTo(rect.top, 5); | ||
done(); | ||
}); | ||
}) | ||
|
Huh, do u happen to know why this was failing for you or for CI? On my machine, those were very close to each other - basically just a rounding error. That's why I have used
0.1
so given that5
seems quite too high. It's still rather unlikely that this will result in false positives but I'm wondering why this change was needed 🤔