bootstrap-rubygem
bootstrap-rubygem copied to clipboard
Errors after upgrading from 4.3.0 to 4.3.1
I upgraded this gem from 4.3.0 to 4.3.1. Now when running my tests I am getting errors logged such as:
jQuery.Deferred exception: null is not an object (evaluating 'createdDocument.body') sanitizeHtml@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:15965:49
_getConfig@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16578:39
Tooltip@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16107:36
http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16643:29
each@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:355:23
each@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:190:21
_jQueryInterface@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:16633:23
http://localhost:41065/assets/application-7de341d...8b5bd36839.js:66417:41
mightThrow@http://localhost:41065/assets/application-7de341d...8b5bd36839.js:3535:34
http://localhost:41065/assets/application-7de341d...8b5bd36839.js:3603:22 undefined
These errors happen when running rspec using capybara and during a visit
command to visit a page.
All the tests seem to be passing, but I am trying to figure out what is causing these errors being logged to the console as the tests are running.
So I traced this to tool tips. When capybara pulls up a page during a test to examine it and a Bootstrap tool tip exists, it fires this off in the log. The test passes; however, does anyone know what might be causing this or how to better trace what is going on?
I am not using any HTML in the tool tip that the new sanitizer might affect. It is just text.
I am able to avoid these errors being logged if I bypass the sanitizer like so:
$('#yourTooltip').tooltip({
sanitizeFn: function (content) {
return content
}
})
Not what I want to do of course, but at least this narrows it down more.
I doubt this has anything to do with the rubygem in particular. Consider posting your issue upstream.
Note I had the same exact issue and it was really a problem with PhantomJS... we will consider alternative headless javascript runners https://github.com/twbs/bootstrap/issues/28695