LiveTL / HyperChat

Improved YouTube chat with CPU/RAM optimizations, customization options, and cutting-edge features!
https://livetl.app/hyperchat
GNU Affero General Public License v3.0
242 stars 24 forks source link

#36 try to get a chrome and firefox e2e test running #99

Open sangohan opened 2 years ago

sangohan commented 2 years ago

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

KentoNishi commented 2 years ago

jesus this is so high effort lmao

pinging our resident e2e test writer @r2dev2

r2dev2 commented 2 years ago

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.

r2dev2 commented 2 years ago

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.

r2dev2 commented 2 years ago

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.

sangohan commented 2 years ago

It could help the vsc users and potentially codespaces/gitpod users by setting up a dev environment automatically.

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?)