theia-ide / sprotty

A next-gen web-based graphics framework
Apache License 2.0
138 stars 23 forks source link

Add basic ui test infrastructure #89

Closed epatpol closed 6 years ago

epatpol commented 7 years ago

So I tried adding a basic ui test to the sprotty client side using webdriverio (same package that theia uses) but I came upon some problems by doing so. First of all webdriverio cannot open a static file, so I add to create a basic server that would serve a basic page using sprotty. As I didn't want to bundle up the same examples in the webpack (I only wanted a basic test), I had to create another webpack config in the test folder.

Note that this is more a draft than an actual pull request. The more I think about how I had to do it, the more it feels like the ui tests should be in a separate repo (once sprotty becomes an npm package maybe?). For now, I'll just keep this one here so that we can discuss the best way to make ui testing part of sprotty.

JanKoehnlein commented 7 years ago

Looks good so far. I fear we have to live with the performance...

Let's discuss the separate repository with the Theia team.

spoenemann commented 7 years ago

I think it would be ok to have the ui testing in the same repo as long as it's in a separate subfolder. We could call it ui-test to indicate that the headless unit tests are not included there.

A few questions:

epatpol commented 7 years ago

@spoenemann I agree with having the ui tests in a separate folder. I'll edit that soonish.

JanKoehnlein commented 7 years ago

@epatpol Any news on this PR? In the meantime we have test coverage running. Would be great if that took UI tests into account as well.

spoenemann commented 6 years ago

Let's reopen this when someone becomes interested in finishing the work.