Skip to content

Add smoke test for playground#1593

Open
Goodwine wants to merge 2 commits into
mainfrom
playground-test-spectrum
Open

Add smoke test for playground#1593
Goodwine wants to merge 2 commits into
mainfrom
playground-test-spectrum

Conversation

@Goodwine

@Goodwine Goodwine commented May 8, 2026

Copy link
Copy Markdown
Member

Adds puppeteer to run the devserver and see if the playground loads correctly using a preselected input via a predefined URL.

@netlify

netlify Bot commented May 8, 2026

Copy link
Copy Markdown

Deploy Preview for sass-lang ready!

Name Link
🔨 Latest commit 14f82dc
🔍 Latest deploy log https://app.netlify.com/projects/sass-lang/deploys/69fd3c7e5529e80008bd6508
😎 Deploy Preview https://deploy-preview-1593--sass-lang.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@Goodwine Goodwine requested a review from nex3 May 8, 2026 01:26
Comment thread tool/test-playground.ts
/** 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});

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread tool/test-playground.ts
Comment on lines +104 to +105
console.log('Shutting down dev server...');
serverProcess.kill('SIGKILL');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 nex3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Comment thread tool/test-playground.ts
/**
* Waits for an element matching `selector` to contain `text`.
*
* Throws an error if such element is not found. Supports all options of

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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

Comment thread tool/test-playground.ts
/**
* Loads the playground and makes sure it loads correctly.
*
* We just thest that the playground loads the default code and that it has

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants