Use classes instead of IDs for TOC collapsing
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.toc.test.js
index 297f0fd..70a7e35 100644 (file)
@@ -12,7 +12,7 @@
                assert.strictEqual( $( '#toc' ).length, 0, 'There is no table of contents on the page at the beginning' );
 
                tocHtml = '<div id="toc" class="toc">' +
-                       '<div id="toctitle">' +
+                       '<div id="toctitle" class="toctitle">' +
                        '<h2>Contents</h2>' +
                        '</div>' +
                        '<ul><li></li></ul>' +
@@ -21,7 +21,7 @@
                mw.hook( 'wikipage.content' ).fire( $( '#qunit-fixture' ) );
 
                $tocList = $( '#toc ul:first' );
-               $toggleLink = $( '#togglelink' );
+               $toggleLink = $( '#toc .togglelink' );
 
                assert.strictEqual( $toggleLink.length, 1, 'Toggle link is added to the table of contents' );