diff options
author | Keith Wood <kbwood.au@gmail.com> | 2009-12-26 08:35:40 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2009-12-26 08:35:40 +0000 |
commit | 0c35c1135f57e0cf533963ec55b34f55704d9824 (patch) | |
tree | f67f652ee3f36a2ad3bee33f2249ce6ce5912c46 /tests/unit/datepicker | |
parent | 9a786e03a1edda7efb31b0ad6b20e5bcd62d9482 (diff) | |
download | jquery-ui-0c35c1135f57e0cf533963ec55b34f55704d9824.tar.gz jquery-ui-0c35c1135f57e0cf533963ec55b34f55704d9824.zip |
Datepicker: Corrected tests for changes in r3494
Diffstat (limited to 'tests/unit/datepicker')
-rw-r--r-- | tests/unit/datepicker/datepicker_options.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js index 5bdf415e0..9656b69d7 100644 --- a/tests/unit/datepicker/datepicker_options.js +++ b/tests/unit/datepicker/datepicker_options.js @@ -510,13 +510,17 @@ test('altField', function() { equals(alt.val(), '', 'Alt field - alt - ctrl+end'); // Verify alt field is updated on keyup alt.val(''); - inp.val('06/04/2008').datepicker('show'); - inp.simulate('keyup', {keyCode: $.simulate.VK_ENTER}); + inp.val('06/04/200').datepicker('show'); + inp.simulate('keydown', {charCode: '8'.charCodeAt(0)}); + inp.simulate('keypress', {charCode: '8'.charCodeAt(0)}); + inp.simulate('keyup', {charCode: '8'.charCodeAt(0)}); equals(inp.val(), '06/04/2008', 'Alt field - dp - manual entry'); equals(alt.val(), '2008-06-04', 'Alt field - manual entry'); // Verify alt field is not updated on keyup if date is invalid - inp.val('12/04/'); - inp.simulate('keyup', {keyCode: $.simulate.VK_ENTER}); + inp.val('12/04'); + inp.simulate('keydown', {charCode: '/'.charCodeAt(0)}); + inp.simulate('keypress', {charCode: '/'.charCodeAt(0)}); + inp.simulate('keyup', {charCode: '/'.charCodeAt(0)}); equals(inp.val(), '12/04/', 'Alt field - dp - manual entry incomplete'); equals(alt.val(), '2008-06-04', 'Alt field - manual entry - not updated'); }); |