postInteractionWait does not work anymore on v6.1.1 (puppeteer)
Hello,
Looks like v6.1.1 update "puppeteer": "^14.2.1", to "puppeteer": "^15.4.0",
when postInteractionWait on backstop.json file is greater than 0 (ie 3000)
backstop will throw an error below
Puppeteer encountered an error while running scenario... TypeError: page.waitFor is not a function
steps to reproduce
use backstop v6.1.1 create a new project backstop init backstop reference
no errors so far
now change postInteractionWait in backstop.json file to something other than 0 (ie 3000) run backstop reference again
error msg
SCENARIO > BackstopJS Homepage
Puppeteer encountered an error while running scenario "BackstopJS Homepage"
TypeError: page.waitFor is not a function
Browser Console Log 0: JSHandle:BackstopTools have been installed.
SCENARIO > BackstopJS Homepage
Puppeteer encountered an error while running scenario "BackstopJS Homepage"
TypeError: page.waitFor is not a function
FWIW rolling back to backstopjs 6.1.0 got me around this. Saw this in the log output:
waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code.
For those running into the issue and finding this issue - there's now a PR to fix this (#1441) but you might need to fix this yourself if you have a puppet/clientAndHoverHelper.js generated by a previous version of backstop.
Have a look here for inspiration.