mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2024-11-27 12:49:27 +08:00
27 lines
711 B
JavaScript
27 lines
711 B
JavaScript
|
module('Keyboard Navigation (All)', {
|
||
|
setup: function(){
|
||
|
this.input = $('<input type="text">')
|
||
|
.appendTo('#qunit-fixture')
|
||
|
.datetimepicker({format: "dd-mm-yyyy"})
|
||
|
.focus(); // Activate for visibility checks
|
||
|
this.dp = this.input.data('datetimepicker')
|
||
|
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');
|
||
|
});
|