summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #24593 from nextcloud/backport/23912/stable19Morris Jobke2021-01-073-0/+24
|\ | | | | [stable19] use in objectstore copy
| * use in objectstore copyRobin Appelman2020-12-073-0/+24
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Show unique displayname context in the sharing inputJulius Härtl2021-01-052-23/+23
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix vsprint parameterRoeland Jago Douma2020-12-031-1/+1
| | | | | | | %2\$; is not valid. On php7 this is just ignored but on php8 it gives an error. %2\$s; works. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* set the display name of federated sharees from addressbookArthur Schiwon2020-11-253-9/+58
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Add unit tests for "validateExpirationDateInternal"Daniel Calviño Sánchez2020-11-161-0/+284
| | | | | | | They were copied and adjusted as needed from the tests for "validateExpirationDate". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add explicit time to test date for clarityDaniel Calviño Sánchez2020-11-161-3/+5
| | | | | | | This shows in a clearer way that the expected expiration date is the original one, but without time. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add unit test for expiration date with date and with defaultDaniel Calviño Sánchez2020-11-161-0/+28
| | | | | | | This adds back what was being actually tested in the unit test fixed in the previous commit. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test for expiration date without date but with defaultDaniel Calviño Sánchez2020-11-161-7/+5
| | | | | | | | | The expiration date was explicitly given, so it was not testing what it should. Moreover, "link_defaultExpDays" needs to be mapped when testing the default value (even if it will just fallback to the value of "shareapi_expire_after_n_days"). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test method nameDaniel Calviño Sánchez2020-11-161-1/+1
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test for verifying enforced valid expiration date.Daniel Calviño Sánchez2020-11-161-0/+1
| | | | | | | The enforced expiration date was not actually enabled, as for that "shareapi_default_expire_date" needs to be explicitly set to "yes". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test for verifying enforced expire date too far in the futureDaniel Calviño Sánchez2020-11-161-8/+5
| | | | | | | | | | | | The test should fail if no exception was thrown, and no exception was thrown due to a missing configuration parameter. However, the use of "addToAssertionCount(1)" made the test pass even if no exception was thrown and, therefore, to silently fail. Now the missing configuration parameter was added and the test will fail if the expected exception is not thrown. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add unit tests to enforce a relaxed default share expiration dateDaniel Calviño Sánchez2020-11-161-0/+21
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Remove wrong and misleading commentDaniel Calviño Sánchez2020-11-161-2/+0
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Remove extra spacesDaniel Calviño Sánchez2020-11-161-10/+6
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix typo in variable nameDaniel Calviño Sánchez2020-11-161-129/+129
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix typos in method namesDaniel Calviño Sánchez2020-11-161-9/+9
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Apply code style fixesMorris Jobke2020-11-112-1170/+1169
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add acceptance tests for reshares by link when resharing is disabledDaniel Calviño Sánchez2020-11-112-0/+110
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add acceptance tests for reshares when resharing is disabledDaniel Calviño Sánchez2020-11-113-0/+192
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Only retry fetching app store data once every 5 minutes in case it failsJulius Härtl2020-11-091-75/+36
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Also run for .sh and .json (when not package or package-lock)Joas Schilling2020-10-302-0/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Also run all tests when drone config is modifiedJoas Schilling2020-10-302-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only run phpunit when php, xml or test files are modifiedJoas Schilling2020-10-302-0/+21
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #23624 from nextcloud/backport/23614/stable19Morris Jobke2020-10-221-42/+43
|\ | | | | [stable19] Disable unreliable app-files-sharing.feature:338
| * Disable unreliable app-files-sharing.feature:108Morris Jobke2020-10-221-42/+43
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Disable unreliable app-files.feature:108Morris Jobke2020-10-221-6/+7
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Clear cached app config while waiting for the SCSSCache to finish processing ↵Morris Jobke2020-10-162-2/+13
| | | | | | the file Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow configuring the activity update interval of tokenRoeland Jago Douma2020-10-061-0/+6
| | | | | | | | On some systems with a lot of users this creates a lot of extra DB writes. Being able to increase this interval helps there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix clicks on actions menu of non opaque file rows in acceptance testsDaniel Calviño Sánchez2020-08-301-7/+37
| | | | | | | | | | | | | | | | When a row is added to the file list the opacity of the file row is animated from transparent to fully opaque. As the file actions menu is a descendant of the row but overflows it when the row is not fully opaque clicks on the menu entries "fall-through" and are received instead by the rows behind. The opacity animation is a CSS animation, and it is not possible to know if a row is appearing or not except from its opacity (the row will have the "appear" CSS class even after the animation ended). Therefore it should be waited until the row of the file is fully opaque before using the menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* In case the group backend returns $limit or more results it is expected to ↵Morris Jobke2020-08-211-1/+1
| | | | | | contain more results Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #21983 from nextcloud/backport/21628/stable19Morris Jobke2020-08-191-8/+2
|\ | | | | [stable19] fix moving files from external storage to object store trashbin
| * use exceptions for error signaling in writeStreamRobin Appelman2020-07-231-1/+0
| | | | | | | | | | | | this remove the ambiguity when writing zero length files Signed-off-by: Robin Appelman <robin@icewind.nl>
| * rollback cache rename if trashbin move failsRobin Appelman2020-07-231-7/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix memory leak caused by not destroying image in Preview/Generate.phpElijah Martin-Merrill2020-08-051-3/+2
| | | | | | | | Signed-off-by: Elijah Martin-Merrill <elijah@nyp-itsours.com>
* | Remove deprecated test of internal attributes via assertAttributeEquals in ↵Morris Jobke2020-07-233-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | constructor tests I removed the tests completely because they just test that the constructor assigns the values to the internal properties. Nothing that should be cared about from the outside. See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322 It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use assertEqualsCanonicalizing instead of deprecated assertEquals parameterMorris Jobke2020-07-231-2/+2
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Remove deprecated test of internal attributes via assertAttributeEqualsMorris Jobke2020-07-232-16/+10
| | | | | | | | | | | | | | | | See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322 It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use assertStringContainsString instead of assertContains on stringsMorris Jobke2020-07-236-18/+18
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #21779 from nextcloud/backport/21499/stable19Roeland Jago Douma2020-07-091-5/+6
|\ | | | | [stable19] fix #21285 as oneliner
| * adapt testGetLoginCredentialsInvalidTokenLoginCredentials() unit test to uid ↵Lionel Elie Mamane2020-07-091-5/+6
| | | | | | | | | | | | != loginname Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
* | ensure mounts are scanned during testsRobin Appelman2020-07-092-1/+7
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Use the correct mountpoint to calculateRoeland Jago Douma2020-07-091-0/+9
|/ | | | | | | If we use the owners mount point this results in null. And then the rest of the checks get called with null. Which doesn't work. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #21574 from nextcloud/backport/21379/stable19Morris Jobke2020-07-062-9/+216
|\ | | | | [stable19] Fix share permission checkboxes enabled when permissions can not be set
| * Add acceptance test for disabling create permission after sharingDaniel Calviño Sánchez2020-06-241-0/+43
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add acceptance test for sharing a folder without create permissionDaniel Calviño Sánchez2020-06-242-0/+75
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add acceptance test for sharing a file without edit permissionDaniel Calviño Sánchez2020-06-242-0/+75
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Generalize functions to get locators for share permission checkboxesDaniel Calviño Sánchez2020-06-241-9/+23
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Revert "[stable19] Do not read certificate bundle from data dir by default"Roeland Jago Douma2020-07-031-2/+3
| |
* | Increase timeout of the appstore requestsJoas Schilling2020-07-021-7/+7
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>