All behave tests passed without any problem on my VM using the real Firefox browser, also tested with PhantomJS headless browser.
Some tests always failed when tested against Xvfb (X virtual framebuffer is a display server implementing the X11 display server protocol) on Travis CI.
Finally got this work using PhantomJS on Travis CI. But I had to change one of the behave tests because phantomjs didn't capture the loading spinner.
Use Travis CI to build phenogrid and run the tests.