HyperChat icon indicating copy to clipboard operation
HyperChat copied to clipboard

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

Open sangohan opened this issue 3 years ago • 5 comments

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

sangohan avatar Aug 01 '22 08:08 sangohan

jesus this is so high effort lmao

pinging our resident e2e test writer @r2dev2

KentoNishi avatar Aug 01 '22 20:08 KentoNishi

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 avatar Aug 03 '22 05:08 r2dev2

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 avatar Aug 03 '22 05:08 r2dev2

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.

r2dev2 avatar Aug 03 '22 05:08 r2dev2

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

sangohan avatar Aug 03 '22 06:08 sangohan