Skip to content

Commit 975089d

Browse files
committed
Test for issue #171
1 parent 0538217 commit 975089d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

spec/Focus.Spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,25 @@ feature("Focusing A Masked Input",function(){
6868
expect(input).toHaveValue("1_");
6969
});
7070
});
71+
72+
73+
scenario("Mask containing optional mask ?,function(){
74+
given("the input has a partial value",function(){
75+
input.val("99");
76+
});
77+
given("a optional mask on input",function(){
78+
input.mask("9?9");
79+
});
80+
when("focusing input",function(){
81+
input.focus();
82+
});
83+
waits(1);
84+
then("caret position should be correct",function(){
85+
var caret=input.caret();
86+
expect(caret.begin).toEqual(0);
87+
expect(caret.end).toEqual(2);
88+
});
89+
});
7190
});
7291

7392
feature("Leaving A Masked Input",function(){

0 commit comments

Comments
 (0)