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

Allow port of local webserver to be configured on postBuild hook

Robin-Hoodie opened this issue · comments

Is your feature request related to a problem? Please describe.

The port of default webserver that is spun op on postBuild is hardcoded to 8080. The base URL Cypress tests against can be configured in several ways, though these are all ignored when using the default webserver.

Describe the solution you'd like

Allow the port of said webserver to be configured

Describe alternatives you've considered

Configuring a custom start command for the webserver, combined with a wait-on=http://localhost:{port} configuration also does the trick. Using wait-on is however undocumented in the postBuild section - the documentation for the preBuild section does mention the wait-on parameter though.