aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/tests
Commit message (Collapse)AuthorAgeFilesLines
* Bump @nextcloud/vue to 3.0.0John Molakvoæ (skjnldsv)2020-10-201-3/+5
| | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* Cleanup old comments tabJohn Molakvoæ (skjnldsv)2020-10-202-836/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-244-0/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-126-54/+54
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Adjust apps' code to use the ContainerInterfaceChristoph Wurst2020-07-211-9/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headers for 19Christoph Wurst2020-04-292-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-104-5/+3
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-091-1/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-271-1/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-251-1/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-252-20/+20
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-058-8/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-273-17/+17
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-278-9/+9
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-2/+2
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Adjust unit tests to new OCA.SidebarJohn Molakvoæ (skjnldsv)2019-10-291-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update unit testsJoas Schilling2019-07-163-1/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add strict type on Notifications testsJohn Molakvoæ (skjnldsv)2019-06-131-3/+20
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Populate the mention-notification with the actual messageJoas Schilling2018-11-081-8/+71
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Redirect guests to login if they follow the link of a comment ↵Joas Schilling2018-10-021-40/+92
| | | | | | mention-notification Signed-off-by: Joas Schilling <coding@schilljs.com>
* Show avatar using "span" instead of "div"Daniel Calviño Sánchez2018-09-051-1/+1
| | | | | | | | Visually it makes no difference, but as the ".avatar" element is inside a "span" element it can not be a block element to be compliant with the HTML specification. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fixing failing test cases due to change in functionality.Abijeet2018-03-271-22/+20
| | | | | | Also fixes scrutinizer warnings. Signed-off-by: Abijeet <abijeetpatro@gmail.com>
* test creating comments with numeric user idsArthur Schiwon2018-02-141-0/+187
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* 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