r114239 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114238‎ | r114239 | r114240 >
Date:08:56, 20 March 2012
Author:santhosh
Status:ok (Comments)
Tags:
Comment:
Fix the issue with testing de transliteration rules(in general when keypress transliterate to the same)
Modified paths:
  • /trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js
@@ -32,7 +32,9 @@
3333 var code = charstr.charCodeAt(i);
3434 // Trigger event and undo if prevented
3535 var event = new jQuery.Event( 'keypress', { keyCode: code, which: code, charCode: code } );
36 - $input.trigger( event );
 36+ if( $input.triggerHandler( event ) ) {
 37+ $input.val( $input.val() + charstr[i] ) ;
 38+ }
3739 }
3840 };
3941
@@ -130,7 +132,16 @@
131133 scheme: 'mr',
132134 $input: $( '<input>' ).attr( { id: "mr", type: 'text' } )
133135 } );
134 -
 136+narayamTest( {
 137+ description: 'German Transliteration and keybuffer test',
 138+ tests: [
 139+ { input: '~o', output: 'ö', description: 'German ö' },
 140+ { input: '~O', output: 'Ö', description: 'German Ö' },
 141+ { input: '~s', output: 'ß', description: 'German ß' }
 142+ ],
 143+ scheme: 'de',
 144+ $input: $( '<input>' ).attr( { id: 'de', type: 'text' } )
 145+} );
135146 teardown( );
136147
137148 }() );

Sign-offs

UserFlagDate
Amire80tested11:13, 20 March 2012

Comments

#Comment by Nikerabbit (talk | contribs)   07:26, 21 March 2012

Can you also explain what was the issue for benefit of the interested?

Status & tagging log