aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Move favorite mark to the top right corner of the thumbnailDaniel Calviño Sánchez2017-10-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The favorite icon was shown on its own "column" (not a real column in the table, but a visual column achieved through margins and left positions). Now the icon was moved to the top right corner of the file thumbnail, and the thumbnail and file name were moved to the left to fill the space left by the "column". To keep the markup in line with its visual representation (and to ease the placing through CSS), the favorite mark is no longer prepended to the row, but appended to the thumbnail instead. In the same way, the thumbnail is no longer appended to the checkbox label, but to the link with the name of the file instead (although the checkbox is still shown at the bottom right corner of the thumbnail, and clicking on the thumbnail still selects the file). In order to show the "busy" state on a file the "icon-loading-small" CSS class is set to the parent element of the thumbnail, so the thumbnail is also wrapped now by another div with the same size and position as the label. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Replace inline favorite action with just a favorite iconDaniel Calviño Sánchez2017-10-191-62/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparatory step for a following commit in which the position of the favorite icon and the checkbox will be swapped; in that new design the favorite icon is no longer expected to be an action but just a simple mark on whether the file is favorited or not (the action is expected to be triggered then only from the file actions menu). The favorite icon is now fully shown or completely hidden depending on whether the file is favorited or not. As the icon is just informative but no longer an action now it does not change when hovered or focus. In the same way, the alternative text when the file is not favorited now it is not "Favorite" (an action) but "Not favorited" instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Add "Favorite" action to the file actions menuDaniel Calviño Sánchez2017-10-191-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new FileAction for the menu is essentially the same as the old inline FileAction, except for the rendering; in this case the FileAction is shown in the menu in a standard way, so there is no need to provide a custom renderer (although the menu entry text and icon change depending on whether the file is currently a favorite or not, but that can be done just with displayName and iconClass functions). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Add support to FileActionsMenu for icon class functionsDaniel Calviño Sánchez2017-10-191-0/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | Icon class function properties make possible to render a different icon class depending on the context of the file action. Inline file actions had support for them already and called them passing the file name and context of the file action as parameters. Due to this the FileActionsMenu passes those parameters too to icon class functions instead of just the context like done for display name functions. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* / Use ::class in test mocksMorris Jobke2017-10-242-17/+19
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fixed testsJohn Molakvoæ (skjnldsv)2017-09-251-8/+9
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix testsRoeland Jago Douma2017-09-211-0/+7
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix unit testsMorris Jobke2017-09-211-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add tests for FileListThomas Citharel2017-09-151-0/+98
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Correctly format OCS response with favoritesRoeland Jago Douma2017-08-291-0/+31
| | | | | | | | | | The helper funtion did not handle the response correctly and basically only returned the last share with tags. This is a simple rewrite. That is still understandable. Loops maybe more than strictly required. But preformance is not the issue here. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #6252 from nextcloud/only_show1_errorMorris Jobke2017-08-261-0/+2
|\ | | | | Don't try the actual file upload if the checks already error out
| * Don't try the actual file upload if the checks already error outRoeland Jago Douma2017-08-261-0/+2
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Fix sorting of entries in Files sidebarJan-Christoph Borchardt2017-08-251-3/+3
|/ | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* fix testRobin Appelman2017-07-111-9/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix sorting of favorite filesDaniel Calviño Sánchez2017-07-051-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sort comparator checks the "isFavorite" property of the FileInfo objects to compare. That property is set when the file list is loaded and the response from the server is parsed, and thus a freshly loaded file list has the proper sorting for favorite files. However, the property is not set in other cases, like when the FileInfo objects are derived from FileInfoModels due to a file being marked as a favorite or a text editor being closed, which causes the file to be sorted in the wrong position. There is no need to add the property in those situations, though; in all cases the TagsPlugin adds a "tags" array property that contains an OC.TAG_FAVORITE tag, so that tag can be checked instead of "isFavorite". Moreover, although "isFavorite" was added by the main "_parseFileInfo" function it did not really belong there but to the "FileInfoParser" from the TagsPlugin; however, as that property now is not used anywhere it was removed altogether. A cleaner solution would have been to make the sort comparator extensible by plugins like other behaviours of the file list and then add the sorting logic related to favorite files to the TagsPlugin. However, right now only the TagsPlugin would need to alter the main sorting logic, and it seems like a corner case anyway. Even if it is implemented as a plugin, favorite files is a core feature, so for the time being it will be taken into account directly in the main sorting logic; making the sort comparator extensible by plugins is defered until there are other use cases for that. Fixes #5410 Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Adjust the unit testJoas Schilling2017-06-131-0/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make possible to know the registered detail views in a details viewDaniel Calviño Sánchez2017-06-092-0/+47
| | | | | | | | In some cases, an app may need to act on a detail view registered by another app or the core, for example, to add extra elements to the element of the detail view. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Do not reload the filelist on first openRoeland Jago Douma2017-05-041-0/+6
| | | | | | | | | | | | | | | | Fixes: #4644 Without this patch the filelist would always reload. However since not all the correct data was set yet it would often: 1. fireoff a propfind to ../webdav/ 2. fireoff a propfind to ../webdav/<PATH> When just opening the file list those are the same so the result is just fine. However if opening a direct link it means that there is a race condition on which finishes first. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Reload file list when leaving hidden stateVincent Petry2017-04-261-0/+6
| | | | | | | | Whenever a file list is already initialized and was hidden when switching to another file list in the navigation bar, if the user comes back to this list it gets redisplayed. At this point the list needs to be refreshed to be able to reflect any potential file changes done from the other lists.
* Merge pull request #4458 from nextcloud/fix/sinon-stub-deprecation-warningsRoeland Jago Douma2017-04-241-1/+1
|\ | | | | Fix sinon.stub deprecation warnings
| * Fix sinon.stub deprecation warningsChristoph Wurst2017-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | Calls to `sinon.stub(obj, 'meth', fn)` are deprecated and therefore replaced by `sinon.stub(obj, 'meth).callsFake(fn)` as instructed by the deprecation warning. This makes the js unit testing output readable again. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Remove unused use statementsMorris Jobke2017-04-221-2/+0
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix the testsJoas Schilling2017-03-261-1/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* added quit option in commentstabview.jsnoveens2017-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added quit option in notif in app.js added quit option in notif in file-upload.js added quit option in notif in fileinfomodel.js added quit option in notif in filelist.js added quit option in notif in filelist.js added quit option in notif in tagsplugin.js added quit option in notif in statusmanager.js added quit option in notif in external.js added quit option in notif in versionstabview.js added quit option in notif in notification.js changes according to the latest review. timeout removed since there is a button to close it translation capability added typo fixed test files updated small errors fixed Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add ignore_files to config,Felix Heidecke2017-03-201-1/+3
| | | | | | | | | | | | | | | | test files against ignore_files list on upload fix typo and indentation Move blacklist declaration to lib/public/Files/FileInfo.php, Rename *ignored to *blacklisted Mocked blacklist_files for testing Mocked blacklist_files for testing Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* filelist only refreshed if directory changesnoveens2017-03-021-0/+18
| | | | | | | | | | | | | | | | check introduced at another method comment added to explain one check comment added to explain one check unit tests added small fixes in unit tests missing semicolon added Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix app name of files appMorris Jobke2017-02-141-6/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add tests for getUser()Joas Schilling2017-02-071-0/+71
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add tests for getFile()Joas Schilling2017-02-071-0/+137
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Style modifications of favorite star on main detail view (#26658)Michael Jobst2016-12-191-10/+10
| | | | | | | | | | | | * Style modifications of favorite star on main detail view * Removed unused opacity change on mouse over * favorite star title fixed * favorite star opacity should always be .7 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add tests for favorite actionJoas Schilling2016-12-041-8/+55
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add some generic testsJoas Schilling2016-12-042-0/+244
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Catch status code 400Lukas Reschke2016-12-011-0/+5
| | | | | | In case the server returns a statuscode 400 we should also gracefully return to the home directory. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Merge pull request #2123 from nextcloud/downstream-26522Joas Schilling2016-11-161-0/+28
|\ | | | | Skip hidden files when counting visible files in list
| * Skip hidden files when counting visible files in list (#26522)Vincent Petry2016-11-141-0/+28
| | | | | | | | | | | | The file list UI logic that renders the next page doesn't properly exclude hidden files when not shown. This fix makes sure that only rows that are actually visible are counted when rendering a page, this makes sure that the page will always have enough elements displayed.
* | Remove the old activity extensionJoas Schilling2016-11-161-367/+0
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Move the favorites filter to IFilterJoas Schilling2016-11-161-7/+0
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Introduce an event for first time login based on the last login time stampThomas Müller2016-11-141-3/+5
|/ | | | | | | | | | | | Use firstLogin event to trigger creation of default calendar and default address book Delay login of admin user after setup so that firstLogin event can properly be processed for the admin Fixing tests ... Skeleton files are not copied over -> only 3 cache entries are remaining Use updateLastLoginTimestamp to properly setup lastLogin value for a test user
* Merge pull request #1741 from nextcloud/new_previewLukas Reschke2016-11-031-13/+32
|\ | | | | Improve previews
| * Added genertor helper & testsRoeland Jago Douma2016-11-031-13/+32
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Merge pull request #1908 from nextcloud/downstream-26078Morris Jobke2016-11-031-4/+57
|\ \ | |/ |/| Upload autorename on client side
| * Upload autorename on client sideVincent Petry2016-11-021-4/+57
| | | | | | | | | | | | | | | | | | | | | | Removes the need for POST to collection which would hit against upload limits. The client tries to auto rename the file by adding a suffix "(2)". It tries to use the file list on the client side to guess a suitable name. In case a file still cannot be uploaded and creates a conflict, which can happen when the file was concurrently uploaded, the logic will continue increasing the suffix.
* | Merge pull request #1978 from nextcloud/remove-send-mail-optionMorris Jobke2016-11-021-2/+0
|\ \ | |/ |/| Remove send mail option
| * remove 'send mail notification' option from sharing, replaced by ↵Bjoern Schiessle2016-11-021-2/+0
| | | | | | | | | | | | send-by-mail feature Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | Remove upload_limit in files app as it is not needed with PUT upload (#26069)Vincent Petry2016-11-021-14/+0
|/ | | | | | | The web UI now uses for PUT uploads which aren't restricted by PHP's upload_max_filesize and post_max_size Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix more testsRoeland Jago Douma2016-10-282-15/+13
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Highlight files and update storage stats at end of upload (#26164)Vincent Petry2016-10-251-4/+13
| | | | | Properly trigger the "stop" even from the uploader. Also update storage stats at the end of all uploads instead of for each upload.
* Merge pull request #1883 from nextcloud/downstream-26145Morris Jobke2016-10-251-1/+1
|\ | | | | Storage 503 message improvements
| * Storage 503 message improvementsVincent Petry2016-10-241-1/+1
| | | | | | | | | | "Storage not available" is now "Storage temporarily not available". Exceptions are now logged in DEBUG level, not FATAL.
* | More fixes to file uploadVincent Petry2016-10-241-1/+1
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>