Merge "Selenium: replace UserLoginPage with BlankPage where possible"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.toc.test.js
index 74fd743..6dab026 100644 (file)
                $( '#qunit-fixture' ).append( $toc );
                mw.hook( 'wikipage.content' ).fire( $( '#qunit-fixture' ) );
 
-               $tocList = $toc.find( 'ul:first' );
+               $tocList = $toc.find( 'ul' ).first();
                $toggleLink = $toc.find( '.togglelink' );
 
                assert.strictEqual( $toggleLink.length, 1, 'Toggle link is added to the table of contents' );
 
-               assert.strictEqual( $tocList.is( ':hidden' ), false, 'The table of contents is now visible' );
+               // eslint-disable-next-line no-jquery/no-class-state
+               assert.strictEqual( $toc.hasClass( 'tochidden' ), false, 'The table of contents is now visible' );
 
                $toggleLink.trigger( 'click' );
                return $tocList.promise().then( function () {
-                       assert.strictEqual( $tocList.is( ':hidden' ), true, 'The table of contents is now hidden' );
-
+                       // eslint-disable-next-line no-jquery/no-class-state
+                       assert.strictEqual( $toc.hasClass( 'tochidden' ), true, 'The table of contents is now hidden' );
                        $toggleLink.trigger( 'click' );
                        return $tocList.promise();
                } );