Faking geolocation javascript API using Casper.js
16 Nov 2011
Testing frontend javascript map behaviours and geolocation stuff is not an easy thing to do.
Casper.js, that come on top of Phantom.js, is a great tool for quickly write functionnal tests, including frontend javascript behaviours cover as it provides an API to access real DOM state.
As QtWebKit doesn’t deal with javascript geolocation API, we need to write a fake location service in order to test user position changes.
will add the expected geolocation faked provider.
Now it’s as easy as ever to test user move: