mozilla / django-browserid

Django application for adding BrowserID support.
Mozilla Public License 2.0
179 stars 80 forks source link

Add automated JavaScript testing #151

Open Osmose opened 11 years ago

Osmose commented 11 years ago

We really really really need some form of automated testing for the JavaScript. Since we'd like to have them run on TravisCI as well as locally, our options are a little limited.

I made a bit of progress on this a while ago using CasperJS, you can see my progress on my casperjs-tests branch. However, I'm not sure if CasperJS can handle the Persona popup.

willkg commented 11 years ago

By "casper-js branch", I think you mean this commit: https://github.com/Osmose/django-browserid/commit/dcdc1de46ba77d07d119add53008eb9639dde3f7

Figured it makes it easier to have the explicit link.

Osmose commented 11 years ago

There were two asdf commits and I thought that they were both CasperJS stuff, turns out one was just in-progress work of an unrelated branch. Doh!

Also I know that there's stuff missing from that commit. I had to do some jumping to get the right packages and such installed. Helpful links I remember using include:

Osmose commented 10 years ago

b4b772f6b81cbdb95b6a2646a407dc58a513ece6 adds unit testing for the JS API, which is really handy. We still don't have testing for the JS that actually binds clicks on the buttons to those functions, but that is less unit-testy and more end-to-end-testy, especially in multiple browsers.

I don't think that particular part is going to block the next release, but perhaps it's worth it as a 1.0 goal?

willkg commented 10 years ago

I think as long as the number of important pieces being tested is monotonically increasing, i don't have a preference for which version which tests make it into.