cypress-io / netlify-plugin-cypress

Runs Cypress end-to-end tests after Netlify builds the site but before it is deployed

Home Page:https://www.cypress.io/blog/2020/03/30/run-cypress-tests-on-netlify-using-a-single-line/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibility to disable postBuild and run tests on preBuild exclusively

TejasQ opened this issue ยท comments

Is your feature request related to a problem? Please describe.
I'm running a NextJS site on Netlify using next-on-netlify. This builds my website in a weird way, with the final published assets in a configuration that I nor cypress can understand. This makes my tests fail. However, if I spin up NextJS' dev server and test with Cypress against that, all works swimmingly.

At this point, my project would build perfectly if I could somehow stop the postBuild from running and testing exclusively with the preBuild.

Describe the solution you'd like
It'd be great if I could pass an option to skipPostBuild: true or similar, and only run my tests preBuild.

Describe alternatives you've considered
I've opened an issue on next-on-netlify to also help build proper static output published assets.

Should be released shortly

[plugins.inputs]
  skip = true

๐ŸŽ‰ This issue has been resolved in version 1.7.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€