I have to run cypress component Test but my application is taking approx 17 mins to bootup. So, it is creating timeout error

Viewed 174

I am using start-server-and-test but it is giving timeout error after 10 mins. I am following cypress documentation only. https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server Another package that I used is npm wait-on but it is also not working

"scripts": {
    "dev": "cd ../../ && npm run start",
    "run:component": "cypress run --spec integration/component_test/*.spec.js",
    "componentTest": "npm run dev  wait-on  http://localhost:3000/ && run:component",
    
  },

I am running "npm run componentTest" but it is not running NEXT_CMD command i.e. run:component

Any suggestion would be really appreciated.

1 Answers

wait-on has a --httpTimeout option, maybe this will work

"componentTest": "npm run dev wait-on --httpTimeout 1020000 http://localhost:3000/ && run:component"
Related