Merge pull request #7648 from nextcloud/fix_7414
Show max warning comment lenth again
This commit is contained in:
commit
d9419f333b
|
@ -512,7 +512,7 @@
|
|||
|
||||
_onTypeComment: function(ev) {
|
||||
var $field = $(ev.target);
|
||||
var len = $field.val().length;
|
||||
var len = $field.text().length;
|
||||
var $submitButton = $field.data('submitButtonEl');
|
||||
if (!$submitButton) {
|
||||
$submitButton = $field.closest('form').find('.submit');
|
||||
|
|
|
@ -411,7 +411,7 @@ describe('OCA.Comments.CommentsTabView tests', function() {
|
|||
expect($message.hasClass('error')).toEqual(false);
|
||||
});
|
||||
it('displays tooltip when limit is almost reached', function() {
|
||||
$message.val(createMessageWithLength(view._commentMaxLength - 2));
|
||||
$message.text(createMessageWithLength(view._commentMaxLength - 2));
|
||||
$message.trigger('change');
|
||||
|
||||
expect(tooltipStub.calledWith('show')).toEqual(true);
|
||||
|
@ -419,7 +419,7 @@ describe('OCA.Comments.CommentsTabView tests', function() {
|
|||
expect($message.hasClass('error')).toEqual(false);
|
||||
});
|
||||
it('displays tooltip and disabled button when limit is exceeded', function() {
|
||||
$message.val(createMessageWithLength(view._commentMaxLength + 2));
|
||||
$message.text(createMessageWithLength(view._commentMaxLength + 2));
|
||||
$message.trigger('change');
|
||||
|
||||
expect(tooltipStub.calledWith('show')).toEqual(true);
|
||||
|
|
Loading…
Reference in New Issue