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

Add only-shell option to run options #518

Conversation

carsonmeyer-wk
Copy link
Contributor

I am looking to add the feature defined in the docs here: https://playwright.dev/docs/browsers#optimize-download-size-on-ci so that I can reduce the amount of space used by downloading browsers. I only need to use the shell.

run_test.go Outdated
Comment on lines 82 to 86
err = driver.Install()
require.NoError(t, err)

err = driver.Uninstall()
require.NoError(t, err)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am a little uncertain on how I should be checking if only the shell browser is installed. I thought about checking through the logs like the test above does, but that could cause problems if upstream playwright repo changes how anything is logged.

@carsonmeyer-wk carsonmeyer-wk marked this pull request as ready for review January 15, 2025 19:27
@canstand
Copy link
Collaborator

You can check the stdout, it should contain browser: chromium-headless-shell. And using --dry-run to simplify the tests is also acceptable.

@carsonmeyer-wk
Copy link
Contributor Author

@canstand I have implemented what you suggested. It appears to be working and have pushed up the commits.

@canstand canstand merged commit 4b99890 into playwright-community:main Jan 18, 2025
22 checks passed
@carsonmeyer-wk
Copy link
Contributor Author

@canstand Could I get a tag with this in it?

@canstand
Copy link
Collaborator

Done

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