-
-
Notifications
You must be signed in to change notification settings - Fork 415
feat: support Playwright testing for Scala-JS #5777
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
base: main
Are you sure you want to change the base?
feat: support Playwright testing for Scala-JS #5777
Conversation
I agree to it. It's nice to have out-of-the-box support for popular |
814d451
to
032158d
Compare
val defaultWebkitLaunchOptions = List( | ||
"--disable-extensions", | ||
"--disable-web-security", | ||
"--allow-running-insecure-content", | ||
"--disable-site-isolation-trials", | ||
"--allow-file-access-from-files" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do these options come from? Can you link some documentation to ease future maintenence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the defaults we currently have in the plugin. Shall I just add some documentation referring to the plugin repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that helps maintaining them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find any docs related to using the jsEnvConfig
task. Where shall we add something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added refs to the plugin repo source in code docs.
The rationale to not depend on the scalajs artifact was binary compatibility. If we used scalajs-jsenvs in mill it means that if scala-jsenvs gets a version 2.0 it's a problem in Mill since it would not be binary compatible with the one we shipped. in |
I already assumed that. However, adding new test-environments is now only possible by modifying the build tool. Would there be a path possible where this could be pulled in via a plugin perhaps? (And perhaps would should open a discussion to answer this) |
Could there be made a decision on what is going to happen with this PR? Rolling my own Mill because I need Playwright is quite annoying. |
I could not find any existing JSEnv which allows me to properly test against some browser features and am using scala-js-env-playwright for a while now. The current version is still a snapshot so this PR is not ready to be merged, but I would love some feedback on what is required to get this feature as part of Mill. Currently I am using a custom build mill-assembly for my projects.
Here a draft of Playwright support for Scala-js testing.
I was also wondering why isn't Mill supporting just a raw JSEnv? Any custom JSEnv implemention now first requires Mill to include it..