netlify-plugin-cypress
netlify-plugin-cypress copied to clipboard
chore(deps): upgrade puppeteer to latest version
A reopen of #301 (though going to v15 instead of v13 because this is now the most recent version) as folks are still running into this on M1 laptops
Original description:
Puppeteer v10+ addresses an issue where installation would fail on Apple Silicon/M1, which is what was happening in this project as well prior to upgrading the package
Error that was being run into:
npm ERR! command sh -c node install.js npm ERR! The chromium binary is not available for arm64. npm ERR! If you are on Ubuntu, you can install with: npm ERR! npm ERR! sudo apt install chromium npm ERR! npm ERR! npm ERR! sudo apt install chromium-browser npm ERR! npm ERR! /Users/ericapisani/netlify/netlify-plugin-cypress/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115 npm ERR! throw new Error(); npm ERR! ^ npm ERR! npm ERR! Error npm ERR! at /Users/ericapisani/netlify/netlify-plugin-cypress/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115:27 npm ERR! at FSReqCallback.oncomplete (node:fs:198:21)
It seems circleci needs to be configured for netlify somehow, based on a brief look at the failing tests. This seems related if someone has credentials to log in: https://github.com/cypress-io/netlify-plugin-cypress/blob/74a78d25a45ca017bb2d1b3e4c8a0b20f63657eb/CONTRIBUTING.md?plain=1#L16-L20
I cloned it and ran it locally (on an M1 mac) and got many of these failing tests to pass - config-file didn't work off the bat, missing some index.js - didn't look in further.
Methodology:
For each folder in tests I ran PORT=300 npm run start (to avoid the mac system process using port 5000)
I changed cypress.json to point at localhost:3000
For each folder I ran npm run test in another shell. Some didn't have a test script specified.
Not sure how to help further on that, but would love to have this resolved.
This also concerns people that want to use newer CSS and HTML features like logical properties, inert or the <dialog> element in their website. As for me this plugins install a custom chromium 90 (latest release is 107 (!) now) which seems to not have implemented these features and therefore my tests on the CI fail but the tests in my dev environment pass...
@ericapisani I'm looking into getting this up to date and tested. Can you address the merge conflicts here?
@ericapisani scratch that. Now that I get a closer look at this and given how stale this PR got, I'm going to set up a new PR on this side.
A newer version of this PR, https://github.com/cypress-io/netlify-plugin-cypress/pull/320 was merged.