summaryrefslogtreecommitdiffstats
path: root/core/js/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix a misleading setup check for .well-known/caldav & carddavMorris Jobke2018-10-101-4/+4
| | | | | | The problem is that the version without the slash is the correct one. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Improve URL detectionJoas Schilling2018-08-231-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Improve url detection in commentsJoas Schilling2018-07-111-0/+50
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix ids of permission checkboxes for sharesDaniel Calviño Sánchez2018-05-101-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | The ids of permission checkboxes for shares were generated using the "shareWith" field of the share. The "shareWith" field can contain spaces (as spaces are allowed, for example, in user or circle names), so this could cause the id attribute of the HTML element to contain spaces too, which is forbidden by the HTML specification. It is not just a "formal" issue, though; when the list was rendered after a permission change, if the id contained a space the selector to get the checkbox element was wrong (as it ended being something like "#canEdit-view1-name with spaces") and thus the updated state of the checkbox was not properly set. Besides that, "shareWith" can contain too single quotes, which would even cause the jQuery selector to abort the search and leave the UI in an invalid state. Instead of adding more cases to the regular expression to escape special characters and apply it too when the ids are created now the ids of permission checkboxes for shares are based on the "shareId" field instead of on "shareWith", as "shareId" is expected to always contain compatible characters. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #7635 from Abijeet/bug-7106Roeland Jago Douma2018-01-101-0/+61
|\ | | | | Fixes password input being prompted every time.
| * Add extra test cases for password confirmationDaniel Calviño Sánchez2018-01-101-2/+26
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Added test cases for the fix for the password confirmation box appearing ↵Abijeet2018-01-101-0/+37
| | | | | | | | | | | | repeatedly. Signed-off-by: Abijeet <abijeetpatro@gmail.com>
* | Fix testsJulius Härtl2018-01-081-2/+0
|/ | | | | | | | The avatar plugin should not change the display element, since the avatar is always shown by default and the display value is up to the developers Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #7526 from ↵Morris Jobke2018-01-031-0/+427
|\ | | | | | | | | nextcloud/make-possible-for-apps-to-disable-the-navigation-bar-slide-gesture Make possible for apps to disable the navigation bar slide gesture
| * Force the drag to end when the navigation bar Snap is disabled by an appDaniel Calviño Sánchez2017-12-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Snap was disabled it stopped listening to the events, but if a drag gesture was being performed it was kept as active. Thus, when the Snap was enabled again move events were handled as if the Snap had never been disabled, causing the gesture handling to continue where it was left. When the Snap for the navigation bar is disabled by an app it could be as a result of a different gesture being recognized by the app (for example, a vertical swipe) once both gestures have started. In that case when the other gesture ends and the Snap is enabled again any pointer movement will cause the navigation bar to slide until an "up" event is triggered again (obviously not the desired behaviour). Due to all this now when the Snap for the navigation bar is disabled by an app the current drag gesture for the navigation bar is ended. Note that this was added as a parameter to "Snap.disable()" instead of done unconditionally to keep back-compatibility with the previous behaviour (probably not really needed as it is unlikely that any app is using the Snap library relying on that behaviour... but just in case). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Make possible for apps to disallow the navigation bar slide gestureDaniel Calviño Sánchez2017-12-141-0/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On narrow screens a slide gesture can be used to open or close the navigation bar. However that gesture could conflict at times with the gestures used by certain apps (for example, if the right sidebar is open the user may expect to close it by dragging it to the right, but that could open the navigation bar instead depending on how the events are handled). This commit makes possible for apps to disallow and allow again that slide gesture. In any case, note that applications can only disallow the gesture, but they can not enable it. That is, they can prevent the gesture from being used on narrow screens, but they can not make the gesture work on wide screens; they are always limited by the base rules set by the core. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add unit tests for the navigation bar slide gestureDaniel Calviño Sánchez2017-12-141-0/+104
| | | | | | | | | | | | | | | | The slide gesture is enabled or disabled depending on the width of the browser window. In order to easily control that width the karma-viewport plugin is now used in the unit tests. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix testsRoeland Jago Douma2017-12-191-77/+60
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add testsRoeland Jago Douma2017-12-131-9/+50
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #6079 from nextcloud/fix-antivirusblizzz2017-12-111-2/+16
|\ | | | | Parse Sabre Exception in OC.Files.Client and file-upload
| * Parse Sabre Exception in OC.Files.Client and file-uploadVincent Petry2017-11-131-2/+16
| | | | | | | | | | | | | | | | In case of error, instead of a generic error message, an upload will display whichever message is returned in the Sabre Exception, if applicable. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Merge pull request #6670 from nextcloud/handle-encryption-state-in-web-interfaceTobias Kaminsky2017-12-062-2/+18
|\ \ | | | | | | Handle encryption state in web interface
| * | show e2e folder icon on encrypted foldersBjoern Schiessle2017-11-201-0/+7
| | | | | | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
| * | check for encryption state on propfindBjoern Schiessle2017-11-201-2/+11
| | | | | | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | | Merge pull request #7222 from nextcloud/fix-filerow-avatarsblizzz2017-11-271-12/+135
|\ \ \ | | | | | | | | Fix filerow avatars
| * | | fix sorting test on phantomjsArthur Schiwon2017-11-241-15/+29
| | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | rip out obsolete recipientsDisplayNameArthur Schiwon2017-11-231-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | also needs tests adjustements, and this also brings in natural sorting Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | adjust tests and apply sortingArthur Schiwon2017-11-231-24/+108
| | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | adjust, fix and extend testsArthur Schiwon2017-11-231-12/+39
| |/ / | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* / / Fix unit testsMorris Jobke2017-11-271-25/+25
|/ / | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Merge pull request #7047 from ↵Björn Schießle2017-11-201-32/+18
|\ \ | |/ |/| | | | | nextcloud/add-support-for-files-with-no-permissions Add support for files with no permissions
| * Set read permission for files based on the data returned by the serverDaniel Calviño Sánchez2017-11-021-13/+14
| | | | | | | | | | | | | | | | Now that the permissions returned by the server specify whether a file is readable or not the frontend no longer needs to assume that every file is readable. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix tests for parsing of permissionsDaniel Calviño Sánchez2017-11-021-16/+1
| | | | | | | | | | | | | | Now that these tests are executed they are revealed to be partially obsolete; they were fixed to match the current parsing behaviour. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix asserts silently not executedDaniel Calviño Sánchez2017-11-021-5/+5
| | | | | | | | | | | | | | The first parameter of "apply" must be the object to act as "this", and the Promise callback gets the parameters provided in the "resolve". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Merge pull request #6788 from staabm/masterLukas Reschke2017-11-081-11/+11
|\ \ | | | | | | Prevent XSS in links which open a new browser window
| * | Prevent XSS in links which open a new browser windowMarkus Staab2017-10-191-11/+11
| |/
* | Merge pull request #7064 from nextcloud/popover-fixRoeland Jago Douma2017-11-081-14/+0
|\ \ | | | | | | Fix popover layout
| * | Fixed sharing popover and removed unused old codeJohn Molakvoæ (skjnldsv)2017-11-071-14/+0
| | | | | | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | | Reduce JSHint errors/warningsMorris Jobke2017-11-067-13/+10
|/ / | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Adjust js testsArthur Schiwon2017-11-011-29/+29
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Fix test for tooltip and local share ownerJan-Christoph Borchardt2017-11-011-3/+2
|/ | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Use "?" instead of user ID as seed for the image placeholderDaniel Calviño Sánchez2017-09-201-1/+1
| | | | | | | | | | The seed of the image placeholder is needed to generate the background color of the image, but as the background color is later overriden any seed could be used. When no text is explicitly given the seed is used as text too, so there is no need to pass the user ID and simply using "?" as seed is enough. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Unify appearance of avatars for undefined and unknown usersDaniel Calviño Sánchez2017-09-201-0/+4
| | | | | | | | | | | | | | When calling the jQuery avatar plugin with a user that did not exist (that is, users for which "/avatar/{user}/{size}" return a JSON response with an empty "displayname" value) "?" on a grey background was shown. However, if the jQuery avatar plugin was called with an undefined JavaScript value then "?" was shown on a bluish background. This commit unifies both cases to use the grey background. The unit tests were also modified to ensure that the grey background is used in both cases. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update the URLs in tests to use example.orgMorris Jobke2017-08-011-4/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update setupchecks.jsrakekniven2017-05-311-1/+1
| | | | | | | | | | | Fixed typo and removed doclink symbol. Reported at transifex Update util.php Another l10n improvement from transifex. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update Opcache recommendationMorris Jobke2017-05-211-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #4518 from nextcloud/downstream-25838Roeland Jago Douma2017-04-261-0/+61
|\ | | | | Fix share indicator handling
| * Fix share indicator handlingVincent Petry2017-04-261-0/+61
| | | | | | | | | | Properly update the fileInfoModel with the updated share types, which also updates the file list row indicator properly
* | handle 404 separatelyGeorg Ehrke2017-04-261-0/+15
| | | | | | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* | unit test jquery.contactsmenuGeorg Ehrke2017-04-261-0/+198
|/ | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Fix testJan-Christoph Borchardt2017-04-261-1/+1
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Fix failing contacts menu js test dataChristoph Wurst2017-04-251-2/+12
| | | | | | | | When we test wheter action menus in the contacts menu close when clicking other ones, we have to provide test data that actually causes the view to render the menu. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Contacts menuChristoph Wurst2017-04-251-0/+255
| | | | | | | * load list of contacts from the server * show last message of each contact Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #4462 from danxuliu/fix-sharing-password-protected-linkRoeland Jago Douma2017-04-252-0/+296
|\ | | | | Fix sharing a password protected link
| * Use "complete" callback in onPasswordEnteredDaniel Calviño Sánchez2017-04-241-1/+2
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>