cypress-movie icon indicating copy to clipboard operation
cypress-movie copied to clipboard

Cypress-movie not showing cursor tracking

Open niekvandael opened this issue 3 years ago • 4 comments

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?

niekvandael avatar May 20 '21 13:05 niekvandael

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.

tho-masn avatar May 20 '21 13:05 tho-masn

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 avatar May 20 '21 13:05 niekvandael

@tho-masn,

Got it fixed by adding the files ad described in my previous post: (https://github.com/bahmutov/cypress-movie/issues/94#issuecomment-845136585)

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!

niekvandael avatar May 20 '21 14:05 niekvandael

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.

tho-masn avatar May 20 '21 14:05 tho-masn