Fix UT to use headless browser (phantomjs) so that it can be tested in Jenkins