Commit Graph

3 Commits

Author SHA1 Message Date
Andrey Lushnikov
f55d005cbe
fix(page): teach page.click() to click partially offscreen buttons (#2806)
Originally, we use `Element.scrollIntoViewIfNeeded` to make sure
button is on screen before trying to click it.

However, `Element.scrollIntoViewIfNeeded` doesn't work in certain
scenarios, e.g. when element is partially visible and horizontal
scrolling is required to make it fully visible.

This patch polyfills `element.scrollIntoViewIfNeeded` using
IntersectionObserver and `Element.scrollIntoView`.

Fixes #2804.
2018-06-26 18:00:55 -07:00
Andrey Lushnikov
5d106f79d8
test: flatten tests (#2337)
Today, we have tests split into multiple files, with files pulling
tests from some other files.

This patch starts explicitly gathering all tests from the same
`test.js` file.

Drive-By: move one test from `browser.spec.js` into `puppeteer.spec.js`
since it starts browser itself.
2018-04-09 16:38:00 -07:00
Yaniv Efraim
47481967c5 test: Break 'page.spec.js' to smaller files (#2218)
This patch breaks huge `page.spec.js` into a bunch of smaller files.
2018-03-19 20:00:12 -07:00