Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(adapter): pipe dev server output to console #35

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

tanner-reits
Copy link
Contributor

@tanner-reits tanner-reits commented Apr 3, 2024

What is the current behavior?

Currently, the Playwright process doesn't relay any output from the dev server to the console. This can cause confusion for users if there is a build error in the Stencil project since nothing would be logged in the console and the process would appear to hang until the timeout is reached.

GitHub Issue Number: N/A

What is the new behavior?

This commit updates the default webServer configuration in the Playwright config to pipe the stdout output from the dev server through to the Playwright process.

Unfortunately, AFAICT there isn't a way to terminate the process when this happens. Playwright continuously polls the url until either it: returns a valid status code (200, 300, 400, etc.) or the process timeout is reached. Returning a 500 does not end the process and even returning a code like a 400 will allow tests to execute.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

I confirmed that the dev server output is visible from the Playwright process now.

Also tested various cases trying to get the process to terminate, but was unsuccessful.

Other information

@tanner-reits tanner-reits requested a review from a team as a code owner April 3, 2024 16:40
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

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

Tested locally by creating a project (Stencil component starter) with our instructions at https://stenciljs.com/docs/testing/playwright/overview#set-up

I then created an intentional compiler error in the default component, and was able to see errors in the console.

@tanner-reits tanner-reits added this pull request to the merge queue Apr 9, 2024
Merged via the queue into main with commit 13bc042 Apr 9, 2024
3 checks passed
@tanner-reits tanner-reits deleted the tr/pipe-dev-server-output branch April 9, 2024 21:01
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.

3 participants