-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
#36 try to get a chrome and firefox e2e test running #99
base: master
Are you sure you want to change the base?
Conversation
startUrl: 'https://www.youtube.com/watch?v=5qap5aO4i9A' | ||
} | ||
startUrl: 'https://www.youtube.com/watch?v=jfKfPfyJRdk', | ||
args: process.env.BROWSER === 'firefox' ? [''] : ['--no-sandbox', '--autoplay-policy=no-user-gesture-required'] |
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.
chrome won't start under docker unless you use the --no-sandbox
cli option.
The autoplay-policy option is really only there to let the video start without user interaction. It's not necessary.
@@ -31,8 +31,10 @@ export default defineConfig({ | |||
disableAutoLaunch: process.env.BROWSER === 'none', | |||
browser: process.env.BROWSER === 'firefox' ? 'firefox' : 'chrome', | |||
webExtConfig: { | |||
startUrl: 'https://www.youtube.com/watch?v=5qap5aO4i9A' |
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.
poor lofi girl, her old stream was DMCA taken down. I've replaced it with the current stream, if that's OK.
"features": { | ||
"desktop-lite": { | ||
"password": "vscode", | ||
"webPort": "6080", |
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.
jesus this is so high effort lmao pinging our resident e2e test writer @r2dev2 |
Oh god, I should have mentioned one of the branches called e2e in which I have progress. It has a working setup of tests that I really should have merged by now. It uses python selenium (specifically the autoparaselenium library). I think docker may be overkill for this as browsers tend to execute js in the same way regardless of operating system. Also, the same test should run in windows, macos, and linux. |
The test uses python selenium because I made a library called autoparaselenium which automatically sets up selenium and which allows you run threads in multiple selenium processes. |
The usage of devcontainer is interesting. It could help the vsc users and potentially codespaces/gitpod users by setting up a dev environment automatically. @KentoNishi can you review this to confirm that it works well for vsc/codespaces? I don't use vsc and don't have docker installed so I cannot test it out. |
I just assumed everyone used vsc for doing typescript stuff! I guess i was wrong ;D If devcontainers aren't that helpful, then there's no need to merge any of this stuff in! I'm not sure devcontainers work on codespaces (is that the remote vscode thing you can use on the browser?) |
Initial start to get an e2e test working for issue #36
The first step is to make a consistent environment to which tests can run.
I am attempting it by making use of the devcontainer feature of vscode , which lets you make use of docker to setup a dev environment that is consistent across different machines. This would let you run a test unaffected by environment differences between different maintainers.
Next step is to work out how to execute webdriver under this environment. I am still debating whether to use python selenium, or jest selenium (more natural as this whole project is in typescript...not sure why LiveTL uses python selenium, so may be someone can shed light on that?).