click red target is at the wrong position in 3.5.0
See original GitHub issueCurrent behavior:
When issuing a click on a element using the click
command and specifying the position, for eg. cy.get('button').click(10, 2)
, there is a red pointer that is supposed to indicate where the click was issued but it always appears at the bottom of the button:
Other signatures of the click command seem to show the red indicator at the correct position.
Desired behavior:
The red indicator should be there:
I thought the click was happening at the wrong position before I noticed that it’s actually the red indicator that’s not at the correct position.
Steps to reproduce: (app code and test code)
I created a sample app here. First run the server with npm run server
then open Cypress with npm run cypress:open
, the project contains a single spec file, comparing the three call signatures of the click
command.
The third test exhibits the problem. Also notice how when clicking on the click
operation on the left, the red indicator moves down after the click operation but doesn’t move when using click()
without any parameter:
Versions
Cypress: 3.6.0 OS: macOS Catalina Browser: Chrome 78
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Just to make the issue a bit clearer - I made the ‘button’ 50px x 50px with a bg color (cause I wasn’t sure how large it was from the initial video)
The button should be clicked at 20, 1 which would be 20px to the right and 1px down, but it is clicked at the lower left corner (this happens regardless of the
onclick
handler’s existence.The
onclick
handler demonstrates the second problem of the red indicator moving in the snapshot.index.html
spec.js
3.4.1
3.5.0
Released in
3.6.1
.