Skip to content

Conversation

@alixaxel
Copy link
Contributor

@alixaxel alixaxel commented Oct 22, 2017

Shows a different outcome depending whether or not headless mode is activated.

$ HEADLESS=true npm run unit -- --filter=checkbox

> puppeteer@0.13.0-alpha unit /home/alix/Work/puppeteer
> jasmine test/test.js "--filter=checkbox"

Testing on Node v8.2.1
Started
..


Ran 2 of 261 specs
2 specs, 0 failures
Finished in 0.493 seconds
$ HEADLESS=false npm run unit -- --filter=checkbox

> puppeteer@0.13.0-alpha unit /home/alix/Work/puppeteer
> jasmine test/test.js "--filter=checkbox"

Testing on Node v8.2.1
Started
FF

Failures:
1) Page input should click on checkbox input and toggle
  Message:
    Expected null to be true.
  Stack:
    Error: Expected null to be true.
        at /home/alix/Work/puppeteer/test/test.js:1693:55
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
  Message:
    Expected $.length = 0 to equal 7.
    Expected $[0] = undefined to equal 'mouseover'.
    Expected $[1] = undefined to equal 'mouseenter'.
    Expected $[2] = undefined to equal 'mousemove'.
    Expected $[3] = undefined to equal 'mousedown'.
    Expected $[4] = undefined to equal 'mouseup'.
    Expected $[5] = undefined to equal 'click'.
    Expected $[6] = undefined to equal 'change'.
  Stack:
    Error: Expected $.length = 0 to equal 7.
    Expected $[0] = undefined to equal 'mouseover'.
    Expected $[1] = undefined to equal 'mouseenter'.
    Expected $[2] = undefined to equal 'mousemove'.
    Expected $[3] = undefined to equal 'mousedown'.
    Expected $[4] = undefined to equal 'mouseup'.
    Expected $[5] = undefined to equal 'click'.
    Expected $[6] = undefined to equal 'change'.
        at /home/alix/Work/puppeteer/test/test.js:1694:56
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
  Message:
    Expected null to be false.
  Stack:
    Error: Expected null to be false.
        at /home/alix/Work/puppeteer/test/test.js:1704:55
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)

2) Page input should click on checkbox label and toggle
  Message:
    Expected null to be true.
  Stack:
    Error: Expected null to be true.
        at /home/alix/Work/puppeteer/test/test.js:1711:55
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
  Message:
    Expected $.length = 0 to equal 2.
    Expected $[0] = undefined to equal 'click'.
    Expected $[1] = undefined to equal 'change'.
  Stack:
    Error: Expected $.length = 0 to equal 2.
    Expected $[0] = undefined to equal 'click'.
    Expected $[1] = undefined to equal 'change'.
        at /home/alix/Work/puppeteer/test/test.js:1712:56
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
  Message:
    Expected null to be false.
  Stack:
    Error: Expected null to be false.
        at /home/alix/Work/puppeteer/test/test.js:1717:55
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)

Ran 2 of 261 specs
2 specs, 2 failures
Finished in 0.884 seconds

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@0.13.0-alpha unit: `jasmine test/test.js "--filter=checkbox"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@0.13.0-alpha unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/alix/.npm/_logs/2017-10-22T07_33_25_516Z-debug.log

@aslushnikov
Copy link
Contributor

Wow that's surprising. I'll take a closer look later on some weekday

@JoelEinbinder
Copy link
Contributor

@alixaxel what is your screen resolution/devicePixelRatio? I have a suspicion that this has to do with scale/zoom.

@alixaxel
Copy link
Contributor Author

@JoelEinbinder The resolution I tested this with was 1920 x 1080 @ 2 DPR.

@alixaxel
Copy link
Contributor Author

@JoelEinbinder Could you share more details on your suspicion?

I would like to help but I don't know where to look...

@JoelEinbinder
Copy link
Contributor

@alixaxel Sorry, this slipped by me. The offending code is in https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp?l=439 . It's main job is to do the light blue highlight when you hover over an element in DevTools. It's on my list of things to fix this week.

Copy link
Contributor

@aslushnikov aslushnikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these tests, thanks!

@aslushnikov aslushnikov merged commit 7d18275 into puppeteer:master Nov 8, 2017
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

Successfully merging this pull request may close these issues.

3 participants