apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

Error while testing using Capybara with Selenium driver and rpec #125

Closed chandranshu12 closed 12 years ago

chandranshu12 commented 12 years ago

Hi

I have a rails application and am using Gmaps4rails-1.3.0 to render a map. I am providing users some options to choose which markers will be displayed. All this functionality is working fine across all browsers.

However, when I'm testing this through capybara with selenium driver, no markers are getting hidden. After running the debugger, I found the following error in the error console:

console is not defined
http://127.0.0.1:51643/javascripts/gmaps4rails/gmaps4rails.googlemaps.js?1323052026     Line 196

Opening line 196 in this file, I find a call to console.log in the clearMarkers method call:

Gmaps4RailsGoogle.prototype.clearMarker = function(marker) {
   console.log(marker);
   return marker.serviceObject.setMap(null);
};

I then noticed that during normal operation, a no. of such log messages are displayed in the firebug console. Should the console.log() call be there? If yes, what's the way to test it with a rendering engine?

apneadiving commented 12 years ago

I forgot to remove this debugging help. I removed it in the latest version if I recall well.