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>' +
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' );