Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress-movie not showing cursor tracking #94

Open
niekvandael opened this issue May 20, 2021 · 4 comments
Open

Cypress-movie not showing cursor tracking #94

niekvandael opened this issue May 20, 2021 · 4 comments

Comments

@niekvandael
Copy link

Hi,

As stated in the docs, I have added this to cypress.json to show the cursor as a dot.
Arrows and text are showing nicely, but I cannot see a cursor.
(tested version: 3.0.6)

I'm not sure, but it might be because it's not exported as a 'command'?
https://github.com/bahmutov/cypress-movie/blob/master/commands.js

{
  "env": {
    "cypress-movie": {
      "enabled": **true**,
      "cursorTracking": {
        "enabled": **true**,
        "shape": "dot"
      },
      "width": 1920,
      "height": 640
    }
  }
}

I'm running cypress like this: ./node_modules/.bin/cypress run

Is there anything I am missing?

@tho-masn
Copy link
Collaborator

I agree, this should be added by default or at least stated in the docs - I can have a look at that.

Right now there is some manual work needed. You can view an example here:
https://github.com/bahmutov/cypress-movie/blob/master/cypress/support/index.js

After importing and executing the slowDownCommands and cursorTrackingCommands functions, it should work.

@niekvandael
Copy link
Author

Hi @tho-masn , thank you for your quick answer!

I did the following, and it still didn't work with this error.
I see the cursor flickering on the top left of the page for half a second and after that, it's gone.

image

In the support-folder, i have added all these things:
image

support>index.js, i have added this:
image

@niekvandael
Copy link
Author

niekvandael commented May 20, 2021

@tho-masn,

Got it fixed by adding the files ad described in my previous post:
(#94 (comment))

AND:

  • Adding the css to the current project (css/cursor-dot.css)
  • removing type-delays since they are not compatible with types.js
    (maximum total time delay was greater than cy.wait in types.js)

Thank you!

@tho-masn
Copy link
Collaborator

Cool, thanks for the workaround.

I'll have a look at how this can be improved. This should definitely work without adding those files manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants