summaryrefslogtreecommitdiffstats
path: root/apps/comments/tests
Commit message (Collapse)AuthorAgeFilesLines
* Show max warning comment lenth againRoeland Jago Douma2018-01-021-2/+2
| | | | | | | | | Fixes #7414 Since we no longer use an input field we have to use text instead of val. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #7252 from nextcloud/send-comment-on-enterMorris Jobke2017-12-081-10/+86
|\ | | | | Submit comments with Enter and use Shift+Enter for new lines
| * Fix Enter sending comment instead of adding autocomplete item to messageDaniel Calviño Sánchez2017-12-071-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | When the autocomplete popover is shown the At.js plugin listens on the message input field for key down events, and when Enter is pressed it adds the selected item to the message. However, as "_onTypeComment" also handles key down events for the message input field, when Enter was pressed the comment was submitted and At.js had no chance to add the item before that happened. Now when Enter is pressed and the autocomplete popover is shown the comment is not submitted, and thus At.js adds the selected item to the message as expected. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add unit tests for posting comments with enter keyDaniel Calviño Sánchez2017-11-301-0/+28
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Set text only in the message div of the new comment formDaniel Calviño Sánchez2017-11-301-10/+13
| | | | | | | | | | | | | | | | When finding ".message" elements on "view.$el" the message area for the new comment form and all the comments were matched. Now the selector was restricted to match only the message area for the new comment form. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix unit testsMorris Jobke2017-11-271-2/+2
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-064-3/+11
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge branch 'master' into autocomplete-guiArthur Schiwon2017-11-012-21/+31
|\
| * Use ::class in test mocksMorris Jobke2017-10-242-21/+31
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | adjust jsunit testsArthur Schiwon2017-11-011-7/+8
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix comment sorterArthur Schiwon2017-10-301-5/+18
| | | | | | | | | | | | | | background: we have a flat hierarchy of comments, not a tree. therefore we can also remove again the unnecessary additions. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | configurable amount of autocomplete results in commentsArthur Schiwon2017-10-271-0/+73
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | ensure that sorting is stableArthur Schiwon2017-10-221-1/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | AutoCompletion backendArthur Schiwon2017-10-221-0/+147
|/ | | | | | | | | | * introduce a Controller for requests * introduce result sorting mechanism * extend Comments to retrieve commentors (actors) in a tree * add commenters sorter * add share recipients sorter Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix mentioned user not clickable after posting or editing a commentDaniel Calviño Sánchez2017-05-081-0/+4
| | | | | | | | | | | | | | | | | | | The contactsMenu plugin was called on avatar elements from _postRenderItem, which is called when a new comment is added to the collection. Due to this contactsMenu was not called when messages were edited; when a new comment is posted _postRenderItem is called, but at that time the "mentions" attribute is not filled yet, so "@username" is not replaced by avatars in the message and thus contactsMenu has no avatars to be called on. Calling contactsMenu was moved to a new method, _postRenderMessage, which is called from _postRenderItem and from the success callback when fetching the model in _onSubmitSuccess (which replaces "@username" by avatars in the message after posting or editing a comment). Fixes #4555 Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add missing unit tests for comments with mentionsDaniel Calviño Sánchez2017-05-081-3/+117
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* fix CommentsTabsView js testGeorg Ehrke2017-04-261-1/+1
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Get the user folder of the correct userJoas Schilling2017-03-092-45/+61
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Always enable avatarsMorris Jobke2017-02-131-14/+3
| | | | | | | | | * we introduced this setting in the begining because our avatar support caused some performance issues, but we fixed them and should only provide one way how Nextcloud looks Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Cleanup comment testsJoas Schilling2017-01-091-5/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adjust testsJoas Schilling2016-11-231-18/+56
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update testJoas Schilling2016-11-181-1/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix JS test and introduce tests for rendering mentions to displaynamesArthur Schiwon2016-10-251-8/+62
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move mention extraction to (I)Comment and report mentions via DAVArthur Schiwon2016-10-191-129/+13
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #1449 from nextcloud/comments-user-mentionMorris Jobke2016-10-175-0/+1176
|\ | | | | Notifications for simple @-mentioning in comments
| * apply some polishArthur Schiwon2016-10-142-48/+13
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * emit pre-update event for commentsArthur Schiwon2016-10-122-34/+5
| | | | | | | | | | | | | | * notifications can be cleaned up, no polluted DB * updating comments will re-notify users or remove notifications, depending on the message Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * adjust wording of the notificationArthur Schiwon2016-10-081-5/+4
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * remove notifications of deleted comments from the DBArthur Schiwon2016-10-081-6/+16
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * use different files route/controllerArthur Schiwon2016-10-071-7/+0
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * Notificacations for simple @-mentioning in commentsArthur Schiwon2016-10-075-0/+1238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (WIP) notify user when mentioned in comments Fix doc, and create absolute URL for as notification link. PSR-4 compatibility changes also move notification creation to comments app Do not notify yourself unit test for controller and application smaller fixes - translatable app name - remove doubles in mention array - micro perf optimization - display name: special label for deleted users, keep user id for users that could not be fetched from userManager Comment Notification-Listener Unit Test fix email adresses remove notification when triggering comment was deleted add and adjust tests add missing @license tags simplify NotificationsController registration appinfo simplification, php docs make string easier to translate adjust test replace dispatcher-based listeners with a registration method and interface safer to not pass optional data parameter to setSubject for marking as processed. ID and mention suffices Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> update comment Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Fix js testRoeland Jago Douma2016-10-041-1/+1
|/
* Fix js unit testRoeland Jago Douma2016-08-171-2/+2
|
* Limit comment size to 1000 in UIVincent Petry2016-02-051-0/+78
| | | | | | | | Whenever the limit is almost reached (90% of the length), a tooltip will appear. Once the limit is exceeded, the "Post" button will be disabled and the field will become red.
* Special label for deleted users in comments listVincent Petry2016-02-041-1/+9
|
* Added unit tests for edit/delete commentsVincent Petry2016-02-031-0/+134
|
* Reset comments read marker after loading commentsVincent Petry2016-02-032-4/+82
|
* Add file row indicator for unread commentsVincent Petry2016-02-031-0/+102
|
* Added JS unit tests for commentsVincent Petry2016-02-022-0/+302