Add smoke test for playground#1593
Conversation
✅ Deploy Preview for sass-lang ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| /** Starts the dev sever in the background. */ | ||
| async function startSever(): Promise<ChildProcess> { | ||
| console.log('Starting dev server...'); | ||
| return spawn('npm', ['run', 'serve'], {stdio: 'ignore', detached: false}); |
There was a problem hiding this comment.
I added detached:false because calling kill() seemed to leave some processes running in the background locally..
Having said that, that didn't help lol
| console.log('Shutting down dev server...'); | ||
| serverProcess.kill('SIGKILL'); |
There was a problem hiding this comment.
I tried SIGKILL and SIGINT, but that didn't help terminate the devserver locally 🤔
I also tried adding a "sleep" for 3 seconds and seeing if it was killed, which it was, but I still got npm run watch:... instances running 🤔
nex3
left a comment
There was a problem hiding this comment.
Would killing the process group work?
It looks like the current build failure is due to the browser itself not starting, though. Surely someone has got puppeteer working on GitHub Actions before...
| /** | ||
| * Waits for an element matching `selector` to contain `text`. | ||
| * | ||
| * Throws an error if such element is not found. Supports all options of |
There was a problem hiding this comment.
| * Throws an error if such element is not found. Supports all options of | |
| * Throws an error if such an element is not found. Supports all options of |
| /** | ||
| * Loads the playground and makes sure it loads correctly. | ||
| * | ||
| * We just thest that the playground loads the default code and that it has |
There was a problem hiding this comment.
| * We just thest that the playground loads the default code and that it has | |
| * We just test that the playground loads the default code and that it has |
Adds puppeteer to run the devserver and see if the playground loads correctly using a preselected input via a predefined URL.