diff options
| author | Heinrich Fenkart <[email protected]> | 2014-10-07 06:57:46 +0200 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2014-10-07 06:57:46 +0200 |
| commit | 61705d35fa314a16579169fb7379e5101716e715 (patch) | |
| tree | 133c75ae3938bdb508dabc876363354703eaa647 | |
| parent | 7af7a5eadb385246309f1c6460690fc768795cfa (diff) | |
| download | bootstrap-61705d35fa314a16579169fb7379e5101716e715.tar.xz bootstrap-61705d35fa314a16579169fb7379e5101716e715.zip | |
Small clean-up in scrollspy unit test
| -rw-r--r-- | js/tests/unit/scrollspy.js | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js index c071d0f65..a54263608 100644 --- a/js/tests/unit/scrollspy.js +++ b/js/tests/unit/scrollspy.js @@ -29,22 +29,6 @@ $(function () { strictEqual($scrollspy[0], $el[0], 'collection contains element') }) - // Does not work properly ATM, #13500 will fix this - test('should switch "active" class on scroll', function () { - var topbarHTML = '<div class="topbar">' - + '<div class="topbar-inner">' - + '<div class="container">' - + '<h3><a href="#">Bootstrap</a></h3>' - + '<li><a href="#masthead">Overview</a></li>' - + '</ul>' - + '</div>' - + '</div>' - + '</div>' - var $topbar = $(topbarHTML).bootstrapScrollspy() - - ok($topbar.find('.active', true)) - }) - test('should only switch "active" class on current target', function () { stop() @@ -77,9 +61,9 @@ $(function () { var $section = $(sectionHTML).appendTo('#qunit-fixture') var $scrollspy = $section - .show() - .find('#scrollspy-example') - .bootstrapScrollspy({ target: '#ss-target' }) + .show() + .find('#scrollspy-example') + .bootstrapScrollspy({ target: '#ss-target' }) $scrollspy.on('scroll.bs.scrollspy', function () { ok($section.hasClass('active'), '"active" class still on root node') @@ -107,8 +91,8 @@ $(function () { + '</div>' var $section = $(sectionHTML).appendTo('#qunit-fixture') var $scrollspy = $section - .show() - .filter('#content') + .show() + .filter('#content') $scrollspy.bootstrapScrollspy({ target: '#navigation', offset: $scrollspy.position().top }) |
