summaryrefslogtreecommitdiffstats
path: root/core/js/tests
Commit message (Collapse)AuthorAgeFilesLines
* Re-open popover on link password save failureJohn Molakvoæ (skjnldsv)2020-01-021-3/+9
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* adviced should be advisedVictor Goff2019-08-231-1/+1
| | | | Signed-off-by: Victor Goff <keeperotphones@gmail.com>
* Add unit tests for "OC.Notification.hide()"Daniel Calviño Sánchez2019-07-261-0/+56
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix default timeouts in OC.NotificationDaniel Calviño Sánchez2019-07-261-4/+30
| | | | | | | | | | | | | | | | | | | | | | When no timeout was given "show()" used the default timeout of "OCP.Toast", which is 7 seconds instead of indefinitely as stated in the documentation of "show()". "showHtml()" should also indefinitely show the notification if no timeout is given, but due to the strict comparison the notification was indefinitely shown only when a timeout of 0 was explicitly given. Now both methods show the notification indefinitely (or until it is explicitly hidden) when no timeout is given. The unit tests did not catch this error because "showHtml()" had no tests (as before the move to Toastify it was called from "show()" and thus implicitly tested), and because "show()" verified that "hide()" was not called after some time; "hide()" is no longer called from "show()" since "OCP.Toast" is used internally, so the test always passed even if the notification was indeed hidden. Now the test is based on whether the element is found or not, and explicit tests were added too for "showHtml()". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix mixed test for "show" and "showTemporary"Daniel Calviño Sánchez2019-07-261-1/+19
| | | | | | | | "showTemporary()" when a timeout was given was being tested along with the "show()" tests; now there are two separate tests when a timeout is given, one for "showTemporary()" and one for "show()". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Check number of elements instead of if the jQuery object is definedDaniel Calviño Sánchez2019-07-261-4/+4
| | | | | | | | Tje jQuery object created through "$('#testArea .toastify')" will be always defined even if no elements were found, so the check does not really work; instead, it should be checked the number of elements found. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Rename parameter in OCP.Toast for consistency with OC.NotificationDaniel Calviño Sánchez2019-07-121-6/+11
| | | | | | | | This fixes HTML messages in "OC.Notification.showTemporary" (as "showHtml" was not set based on "isHTML"), and also makes OCP.Toast to keep the old OC.Notification API when used directly. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #16070 from nextcloud/fix/setup-check-no-internet-no-errorRoeland Jago Douma2019-06-281-17/+17
|\ | | | | Do not show a internet connectivity warning if internet access is dis…
| * Do not show a internet connectivity warning if internet access is disabledChristoph Wurst2019-06-271-17/+17
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Fix js l10n registration to also work with more than one bundleChristoph Wurst2019-06-261-2/+2
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Move font from Nunito to Noto SansJan-Christoph Borchardt2019-06-221-2/+2
|/ | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Adjust jsunit tests for new toast libraryJulius Härtl2019-06-072-104/+45
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move OC.theme to the bundle and deprecate oc_defaultsChristoph Wurst2019-05-141-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move l10n functions to the bundleChristoph Wurst2019-05-131-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move initCore to the bundleChristoph Wurst2019-05-101-5/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove recommendation for opcache on CLIMorris Jobke2019-05-091-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Deprecate oc_current_user, fix usage and move currentUser to the bundleChristoph Wurst2019-05-081-9/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move OC.appswebroots to the bundle and deprecate oc_appswebrootsChristoph Wurst2019-05-072-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move oc_webroot, OC.webroot and OC.getRootPath() to the bundleChristoph Wurst2019-05-062-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move oc_appconfig/OC.appConfig to the main bundleChristoph Wurst2019-05-065-12/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Deprecate oc_isadmin and move OC.isUserAdmin() to the bundleChristoph Wurst2019-05-031-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move oc_config to the bundleChristoph Wurst2019-05-021-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change oc_config usage to OC.configChristoph Wurst2019-05-022-11/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #14603 from ↵Morris Jobke2019-03-081-14/+77
|\ | | | | | | | | nextcloud/fix/noid/add-setup-check-for-s3-temp-path Show a setup warning in case S3 object storage is used as primary storage
| * Show a setup warning in case S3 object storage is used as primary storageMorris Jobke2019-03-081-14/+77
| | | | | | | | | | | | * checks for at least 50 GB of free space Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix domparser on phantomjsJulius Härtl2019-03-071-0/+46
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix testsJulius Härtl2019-03-011-1/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add setup check for missing UTF8MB4 on mysqlMorris Jobke2019-02-281-13/+74
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Search sharees on lookup server when explicitly requested by userChristoph Wurst2019-02-261-36/+106
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add unit tests and provide better messageMorris Jobke2019-02-201-0/+36
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix expected depth as stringVincent Petry2019-01-241-2/+2
|
* Remove check for outdated cachesDaniel Kesselberg2019-01-021-13/+0
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Add setup check for pending bigint conversionMorris Jobke2018-12-051-13/+26
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add setup check for recommended PHP modules (i.e. Imagick, intl)Morris Jobke2018-12-051-12/+25
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add check for missing .woff2 rule in Nginx via setup checkMorris Jobke2018-11-291-0/+27
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix whitespace and file action cleanupJulius Härtl2018-11-201-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix share link password inputJohn Molakvoæ (skjnldsv)2018-11-202-7/+5
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #12105 from nextcloud/using-resharing-right-to-display-sharesRoeland Jago Douma2018-11-041-1/+8
|\ | | | | Shares are displayed to users with resharing rights
| * Add uid_owner to enable permission settings on the viewsJulius Härtl2018-11-021-1/+8
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Fix app menu calculation for random size of the right headerJulius Härtl2018-11-021-0/+4
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Add "Password protect by Talk" to the menu of link sharesDaniel Calviño Sánchez2018-11-022-3/+123
|/ | | | | | | | | | | | | | | | | | | | | | | When Talk is enabled the menu for link shares now shows a checkbox to protect the password by Talk (that is, to show the "Request password by Talk" UI in the authentication page for the link share). Although in e-mail shares protecting the share with a password and protecting the password by Talk are mutually exclusive actions (as when the password is set it is sent to the sharee, so it must be set again when protecting it by Talk to be able to verify the identity of the sharee), in the case of link shares protecting the password by Talk is an additional step to protecting the share with a password (as just setting the password does not disclose it to anyone). As such, the checkbox is shown only when there is a password set for the link share (even if the field itself for the password is not shown, like when they are enforced in the settings). Note that the icon set for the field, "icon-passwordtalk", does not currently exist; it is the same used for e-mail shares, and it is needed simply to get the right padding in the menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #11844 from nextcloud/multiple-link-sharesMorris Jobke2018-11-015-69/+75
|\ | | | | allow to create multiple link shares via share api
| * Fixed jsunitJohn Molakvoæ (skjnldsv)2018-11-015-69/+75
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Add tests for edit permission state on file sharesJulius Härtl2018-10-311-0/+31
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add "Hide download" to the menu of link sharesDaniel Calviño Sánchez2018-10-302-3/+104
| | | | | | | | | | Hiding the download does not depend on other settings and it does not affect other settings either (for example, it would be possible to hide the downloads yet make the share editable), so a simple checkbox was added to the menu. However, note that this option is only available for files, but not for folders. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #11893 from caugner/7837-filesize-format-with-localeMorris Jobke2018-10-251-0/+58
|\ | | | | Formats file sizes using the user's locale
| * OC.getCanonicalLocale: fix testsClaas Augner2018-10-241-4/+8
| | | | | | Signed-off-by: Claas Augner <git@caugner.de>
| * humanFileSize: use toLocaleStringClaas Augner2018-10-241-0/+54
| | | | | | | | | | | | | | | | | | | | | | humanFileSize: add test with locale humanFileSize: use canonical locale humanFileSize: skip test w/o toLocaleString support humanFileSize: stub getCanonicalLocale OC.getCanonicalLocale: cover undefined case humanFileSize: fix getCanonicalLocale stub Signed-off-by: Claas Augner <git@caugner.de>
* | Merge pull request #11396 from nextcloud/wellknown-webfingerMorris Jobke2018-10-241-3/+14
|\ \ | |/ |/| adding .well-known/webfinger
| * Make possible to set the expected status of the well known URL checkDaniel Calviño Sánchez2018-10-101-3/+14
| | | | | | | | | | | | | | | | | | The check is based on the HTTP status returned by the URL, and different URLs may return different status (for example, DAV returns 207, while a service like WebFinger would return 200), so the expected status needs to be set depending on the URL. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>