Skip to content

Commit

Permalink
Adding tests for PR#125
Browse files Browse the repository at this point in the history
Checks whether indicator is visible on input focus, and hidden when input blurs.
  • Loading branch information
Hallaathrad authored and Hallaathrad committed Sep 7, 2016
1 parent 15faf38 commit fb97ce6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/optionsTests/alwaysShowTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@ $(function () {
}
});

function checkVisibility () {
ok($('.bootstrap-maxlength').is(':visible'), 'Maxlength is visible');
}

test('The badge is always visible', function () {
maxlengthInput.val('Hello World');

maxlengthInput.focus();
checkVisibility();
ok($('.bootstrap-maxlength').is(':visible'), 'Maxlength is visible when input:focus');

maxlengthInput.blur();
checkVisibility();
ok($('.bootstrap-maxlength').not(':visible'), 'Maxlength is not visible when input:not(:focus)');
});

});

0 comments on commit fb97ce6

Please sign in to comment.