-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap 4 + jQuery 3 unit test failures/errors #20182
Comments
@cvrebert I'll take a look and let you know what's up. I can also test in Edge and IE. |
I think the PR should fix it. Worked fine in IE11 and Edge as well. |
Instead of doing a new assert.async(), just do a single one for the entire test and let the .then() be async as well. Closes #20190
Fixed by #20190. |
Per #20191 (comment), we're still getting the "scrollspy: should add the active class to the correct element" failure on OS X Safari and Chrome-based Android 5.1 sometimes. |
I'm on it! |
Why I still have this notification? Error: Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v3.0.0 |
Because it's not yet merged let alone released? |
Even if I use the dev version? |
Nope. See #20191. |
Fixed by #20198. Hopefully that's the last one. |
Scrollspy test: Allow for async .then() in jQuery 3; fixes twbs#20182 Instead of doing a new assert.async(), just do a single one for the entire test and let the .then() be async as well.
ScrollSpy unit test: Use single done() in a then() instead of multiple done()s Fixes test flakiness on OS X Safari and Android when using jQuery 3. Fixes twbs#20182 more Refs twbs#20191
Running https://github.com/twbs/bootstrap/blob/v4-dev/js/tests/index.html with jQuery v3.0.0 swapped in, I encountered the following failures/errors. Haven't yet investigated/diagnosed them.
@dmethvin Pinging you per your request in #19433.
Chrome + Safari
Intermittent test failure
(Sometimes fails earlier/later within the set of 5 assertions)
scrollspy: should correctly select navigation element on backward scrolling when each target section height is 100% (1, 2, 3) Rerun
Expected 5 assertions, but 4 were run
Source:
at HTMLDocument.
<anonymous>
(file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:288:9)at mightThrow (file:///Users/chris/code/bootstrap/js/tests/vendor/jquery.min.js:3505:29)
at process (file:///Users/chris/code/bootstrap/js/tests/vendor/jquery.min.js:3573:12)
Intermittent console error
jQuery.Deferred exception: Cannot read property 'top' of undefined
TypeError: Cannot read property 'top' of undefined
at testElementIsActiveAfterScroll (file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:316:79)
at file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:329:34
at mightThrow (file:///Users/chris/code/bootstrap/js/tests/vendor/jquery.min.js:3505:29)
at process (file:///Users/chris/code/bootstrap/js/tests/vendor/jquery.min.js:3573:12) undefined
Firefox
Consistent test failure
scrollspy: should correctly select navigation element on backward scrolling when each target section height is 100% (1, 3, 4) Rerun
jQuery.Deferred exception: $(...).position(...) is undefined testElementIsActiveAfterScroll@file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:316:59
@file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:328:34 (or :329:34 or :330:34 ; varies between test runs)
ScrollSpy@file:///Users/chris/code/bootstrap/js/dist/scrollspy.js:91:7
Intermittent test failure
Intermittent FAIL:
scrollspy: should add the active class to the correct element (1, 1, 2) Rerun 32 ms
Expected 2 assertions, but 1 were run
Source: @file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:171:3 resolve/
Intermittent console error
jQuery.Deferred exception: $(...).position(...) is undefined testElementIsActiveAfterScroll@file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:193:59
@file:///Users/chris/code/bootstrap/js/tests/unit/scrollspy.js:205:34
ScrollSpy@file:///Users/chris/code/bootstrap/js/dist/scrollspy.js:91:7
IE and MS Edge
Not Yet Tested.
The text was updated successfully, but these errors were encountered: