Financial-Times / n-test

A CLI tool and module for lightweight testing of web applications in browsers, designed for FT.com
4 stars 2 forks source link

upgrade puppeteer to latest version #197

Closed juanSanchezAlcala closed 1 year ago

juanSanchezAlcala commented 1 year ago

Why ? When running large suites of tests like we are doing on next-article the browser crash suddenly without any reason to such an extent that is blocking our deployments into production. Bumping to the latest version of puppeteer solve this issue.

The new version of puppeteer donwloads by default the chromium browser in ~/.cache folder this conflicts with running on circleci since we are caching only node_modules folder. Therefore I've added a puppeteerrc.js file to config the download and cache folder of puppeteer inside node_modules/puppeteer so it can be cached by circleci otherwise chromium wont be installed and test would fail

jkerr321 commented 1 year ago

Nice solution, thanks @juanSanchezAlcala. One question... this PR bumps puppeteer by 18 major versions which is a lot! Is there no other behaviour changes required in the code (or in the way users interact with the code) as a result of so many version bumps? I just want to confirm that this is not a breaking change. Thanks!

juanSanchezAlcala commented 1 year ago

Nice solution, thanks @juanSanchezAlcala. One question... this PR bumps puppeteer by 18 major versions which is a lot! Is there no other behaviour changes required in the code (or in the way users interact with the code) as a result of so many version bumps? I just want to confirm that this is not a breaking change. Thanks!

I've been checking if some of the methods removed from breaking changes were used on this code and i haven't found anything. Also I've tested with in next-article and works fine. It might be something hidden but anyway i think there are much more issues related to the outdated puppeteer than the ones it can be introduced with the new version