alpaca
Version:
Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide
24 lines (21 loc) • 621 B
JavaScript
feature("Escape Key", function() {
story('User presses escape key after typing in some changes',function(){
scenario('mask is applied with an existing value',function(){
given("an input an existing value '6'", function(){
input
.val('6');
});
given("a mask definition of '9'", function(){
input
.mask('9').focus();
});
waits(1);
when("user types something different then hits escape key",function(){
input.mashKeys(function(keys){keys.type('1',keys.esc)});
});
then("value is return to previous value",function(){
expect(input).toHaveValue('6');
});
});
});
});