1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| module('Keyboard Navigation (All)', {
| setup: function(){
| this.input = $('<input type="text">')
| .appendTo('#qunit-fixture')
| .datepicker({format: "dd-mm-yyyy"})
| .focus(); // Activate for visibility checks
| this.dp = this.input.data('datepicker')
| this.picker = this.dp.picker;
| },
| teardown: function(){
| this.picker.remove();
| }
| });
|
| test('TAB hides picker', function(){
| var target;
|
| ok(this.picker.is(':visible'), 'Picker is visible');
|
| this.input.trigger({
| type: 'keydown',
| keyCode: 9
| });
|
| ok(this.picker.is(':not(:visible)'), 'Picker is hidden');
| });
|
|