Merge "Fix i18n message tog-watchlistunwatchlinks"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki.api / mediawiki.api.upload.test.js
index bfaf7f2..788a427 100644 (file)
 
                api.uploadWithIframe( $( '<input>' )[ 0 ], { filename: 'Testing API upload.jpg' } );
 
-               $iframe = $( 'iframe' );
+               $iframe = $( 'iframe:last-child' );
                $form = $( 'form.mw-api-upload-form' );
                $input = $form.find( 'input[name=filename]' );
 
-               assert.ok( $form.length > 0 );
-               assert.ok( $input.length > 0 );
-               assert.ok( $iframe.length > 0 );
-               assert.strictEqual( $form.prop( 'target' ), $iframe.prop( 'id' ) );
-               assert.strictEqual( $input.val(), 'Testing API upload.jpg' );
+               assert.ok( $form.length > 0, 'form' );
+               assert.ok( $input.length > 0, 'input' );
+               assert.ok( $iframe.length > 0, 'frame' );
+               assert.strictEqual( $form.prop( 'target' ), $iframe.prop( 'id' ), 'form.target and frame.id ' );
+               assert.strictEqual( $input.val(), 'Testing API upload.jpg', 'input value' );
        } );
 
 }( mediaWiki, jQuery ) );