functional tests using phantomjs locally and saucelabs on travis-ci