summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20185 from azul/open-new_tabJohn Molakvoæ2020-04-111-30/+27
|\ | | | | Modify do_action so default ctrl-click opens tab
| * Allow opening files for editing in new tabsAzul2020-04-091-30/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a file list files with a default action have an href that will trigger the action. This way ctrl-click and middle button click open the default action in a new tab. In order to achieve this a new param `openfile` was introduced to the files app. It will make the files app trigger the default action for the file in question. This also allows linking to file content rather than just the details display. Introduce fileList.getDefaultActionUrl() to create a link with that param set. It's overwritten in the trashbin fileList so that anchors continue to have `#` as a href. Fix the link generation for subfolders of public shares: 58a87d0 was the last commit that touched the linkTo function in public.js. It included the params as arguments to the generateUrl function. Turns out this completely ignores the dir parameter now. The inclusion was reverted in other places so revert it here as well. Also change `dir` to `path` in the param as that is respected when following the link. Add Test for the new link url for files with default action. Remove test for multiple selects with ctrl-click as that is not what we are doing anymore. Signed-off-by: Azul <azul@riseup.net>
* | Add visibility to all methods and position of static keywordChristoph Wurst2020-04-101-1/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Format control structures, classes, methods and functionChristoph Wurst2020-04-109-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-092-2/+0
| | | | | | | | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Fix (array) indent style to always use one tabChristoph Wurst2020-04-092-16/+16
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-313-0/+4
| | | | 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 short array syntax, everywhereChristoph Wurst2020-03-262-35/+35
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-254-46/+46
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix unit testsJoas Schilling2020-03-101-56/+75
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make TAG_FAVORITE publicDaniel Kesselberg2020-02-121-2/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix license headersChristoph Wurst2020-01-131-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix webdav urlJohn Molakvoæ (skjnldsv)2020-01-101-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add pending share list to frontendJulius Härtl2020-01-071-0/+11
| | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersChristoph Wurst2019-12-0510-13/+21
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-276-20/+20
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-277-9/+9
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-225-15/+15
| | | | | | | | | | | * 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>
* fix tests for background file scan jobRobin Appelman2019-11-061-3/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Adjust unit tests to new OCA.SidebarJohn Molakvoæ (skjnldsv)2019-10-291-208/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Remove deprecated legacy file actionsJulius Härtl2019-10-142-92/+0
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add new LoadAdditionalScriptsEventRoeland Jago Douma2019-09-231-1/+2
| | | | | | | This adds a new event that is in the new style of event dispatching. This should allow more lazy loading and better sepeartion of concerns Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Revert "Fix usage view tests"Daniel Kesselberg2019-07-021-1/+1
| | | | | | This reverts commit 7da7acd0 Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix usage view testsRoeland Jago Douma2019-07-021-1/+1
| | | | | | Follow up to #16049 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add link icon for public link tooJohn Molakvoæ (skjnldsv)2019-03-211-2/+5
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Remove the upload and memory settingJoas Schilling2019-03-041-84/+0
| | | | | | | | | | * Remove unneeded private method phpFileSize() * Bump autoloader * Remove setUploadLimit tests * Remove integrity check hacks for upload limit Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-011-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix unit testsTomasz Grobelny2019-02-201-49/+95
| | | | Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
* Merge branch 'master' into operation_progress_improvements3Tomasz Grobelny2019-01-291-1/+2
|\ | | | | | | Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
| * Add abort stub in JSUnitMorris Jobke2018-12-061-1/+2
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix unit testsTomasz Grobelny2018-11-242-176/+279
|/ | | | Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
* Rollback to default list viewJohn Molakvoæ (skjnldsv)2018-11-151-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Enhance jsunit testsMorris Jobke2018-11-151-1/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix file move testsJulius Härtl2018-11-071-4/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix testsJohn Molakvoæ (skjnldsv)2018-11-061-4/+7
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix move related testsTomasz Grobelny2018-11-031-54/+63
| | | | Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
* Use grid view in other file views tooJan-Christoph Borchardt2018-10-184-4/+4
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Tests: Properly compare the file action labelJulius Härtl2018-10-151-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Make activity events strictJoas Schilling2018-10-121-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix usage of deprecated OC.webrootChristoph Wurst2018-10-095-37/+37
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fixes empty favorite names for trailing slashesMichael Weimann2018-09-191-3/+69
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Improves the testsMichael Weimann2018-08-171-9/+24
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Adds a test to check that the sorting isn't stored without an userMichael Weimann2018-08-171-0/+16
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Merge pull request #10310 from nextcloud/accessibility-headerMorris Jobke2018-07-251-11/+11
|\ | | | | Accessibility fixes for header and global elements
| * Fix ability to open file or folder via keyboard, fix #10008Jan-Christoph Borchardt2018-07-241-11/+11
| | | | | | | | | | | | | | | | | | | | | | Before, the file or folder was opened when clicking on the name span, but not when clicking on the link that contains the name; clicking on the link highlighted the file and opened the sidebar, just like clicking on the file size or date. Now clicking on the link opens the file or folder, so the unit tests that tested clicks on the link were changed to test clicking on the file size instead. Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* | Phpunit tests fixesJohn Molakvoæ (skjnldsv)2018-07-241-0/+63
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Jsunit fixes 1John Molakvoæ (skjnldsv)2018-07-202-2/+5
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>