XD-865 test framework for admin UI

This PR contains the test framework, tests, and associated refactoring for the UI.

We are using jasmine as the test framework and can run headless using phantomjs