Commit Graph

4243 Commits

Author SHA1 Message Date
Roeland Jago Douma 1b1397b2eb
Merge pull request #9232 from nextcloud/12-9205
[stable12] Provide an option to disable HTML emails
2018-04-19 00:34:59 +02:00
Morris Jobke 7f454fea8e
Provide an option to disable HTML emails
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-04-18 22:53:37 +02:00
Joas Schilling 5f1f6330c9
Show EOL warning in the update section
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-18 13:50:29 +02:00
Daniel Calviño Sánchez 1218cee069 Add acceptance tests for creation of subfolders in public shared folders
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-11 13:04:54 +01:00
Daniel Calviño Sánchez 6e41e0bda5 Extract common "wait for" functions to a helper class
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-11 13:04:53 +01:00
Daniel Calviño Sánchez d757a19b9c Generalize file list steps so a specific ancestor can be used
The "FileListContext" provides steps to interact with and check the
behaviour of a file list. However, the "FileListContext" does not know
the right file list ancestor that has to be used by the file list steps,
so until now the file list steps were explicitly wired to the Files app
and they could be used only in that case.

Instead of duplicating the steps with a slightly different name (for
example, "I rename :fileName1 to :fileName2 in the public shared folder"
instead of "I rename :fileName1 to :fileName2") the steps were
generalized; now contexts that "know" that certain file list ancestor
has to be used by the FileListContext steps performed by certain actor
from that point on (until changed again) set it explicitly. For example,
when the current page is the Files app then the ancestor of the file
list is the main view of the current section of the Files app, but when
the current page is a shared link then the ancestor is set to null
(because there will be just one file list, and thus its ancestor is not
relevant to differentiate between instances)

A helper trait, "FileListAncestorSetter", was introduced to reduce the
boilerplate needed to set the file list ancestor from other contexts.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-11 12:58:13 +01:00
Daniel Calviño Sánchez 3c6a269138 Generalize file list locators so a specific ancestor can be used
The file list is used in other places besides the Files app (for
example, the File sharing app); in those cases the locators for the file
list elements are the same, but not for the ancestor of the file list.
To make possible to reuse the file list locators in those cases too now
they receive the ancestor to use.

Note that the locators for the file actions menu were not using an
ancestor locator because it is expected that there is only one file
actions menu at a time in the whole page; that may change in the future,
but for the time being it is a valid assumption and thus the ancestor
was not added to those locators in this commit.

Although the locators were generalized the steps themselves still use
the "FilesAppContext::currentSectionMainView" locator as ancestor; the
steps will be generalized in a following commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-11 12:58:05 +01:00
Daniel Calviño Sánchez 292e95566e Store the name of the actor in the Actor object
This is needed to be able to easily use the actor as a key in an array.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-11 12:18:26 +01:00
Daniel Calviño Sánchez c62c7dda82 Extract file list locators and steps to its own class
Besides the extraction some minor adjustments (moving parametrized
locators like "fileActionsMenuItemFor" above the locators that use them
and placing "descendantOf" calls always in a new line) were made too.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-11 12:17:18 +01:00
Daniel Calviño Sánchez a24b22e5a2 Add automatic handling of NoSuchElement exceptions
NoSuchElement exceptions are sometimes thrown instead of
StaleElementReference exceptions. This can happen when the Selenium2
driver for Mink performs an action on an element through the WebDriver
session instead of directly through the WebDriver element. In that case,
if the element with the given ID does not exist, a NoSuchElement
exception would be thrown instead of a StaleElementReference exception,
so those cases are handled like StaleElementReference exceptions.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-09 02:24:58 +01:00
Daniel Calviño Sánchez 3da9c2067c Add automatic handling of MoveTargetOutOfBounds exceptions
MoveTargetOutOfBounds exceptions are sometimes thrown instead of
ElementNotVisible exceptions. This can happen when the Selenium2 driver
for Mink moves the cursor on an element using the "moveto" method of the
Webdriver session, for example, before clicking on an element. In that
case, if the element is not visible, "moveto" would throw a
MoveTargetOutOfBounds exception instead of an ElementNotVisible
exception, so those cases are handled like ElementNotVisible exceptions.

Note that MoveTargetOutOfBounds exceptions could be thrown too if the
element was visible but "out of reach"; there is no problem in handling
those cases as if the element was not visible, as the exception will be
thrown again anyway once it is verified that the element is indeed
visible.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-09 02:24:58 +01:00
Morris Jobke 6f4b6bea1c
Merge pull request #8130 from nextcloud/fix-own-avatar-not-updated-when-display-name-is-changed
[stable12] Fix own avatar not updated when display name is changed
2018-02-27 18:40:42 +01:00
Daniel Calviño Sánchez 16b0b3f418 Fix own avatar not updated when display name is changed
The avatar endpoint returns the avatar image or, if the user has no
avatar, the display name. In that later case the avatar is generated on
the browser based on the display name. The avatar endpoint response is
cached, so when the display name changes and the avatar is got again the
browser could use the cached value, in which case it would use the same
display name as before and the avatar would not change.

When the avatar is an image the cache is invalidated with the use of
the "version" parameter, which is increased when the image changes. When
the avatar cache was first introduced only the image avatars were
cached, but it was later changed to cache all avatar responses to limit
the requests made to the server. Thus, now the cache of the display name
is invalidated too by increasing the version of the avatar if the
display name changes and there is no explicit avatar set.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-01-31 18:32:36 +01:00
Robin Appelman 8d5b86c159
Use S3Client::upload instead of splitting single/multipart upload ourselves
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-01-29 16:11:23 +01:00
Daniel Calviño Sánchez a2ae7a52e9 Add acceptance test for renaming a file with the details view open
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-01-11 13:30:04 +01:00
Daniel Calviño Sánchez fd9710bb44
Add missing timeout multiplier
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-01-09 15:58:24 +01:00
Daniel Calviño Sánchez eb6a945332
Wait for the shared link to be set in the acceptance tests
When clicking on "Share link" in the "Sharing" tab of the Files app an
input field with the link appears. That input field already exists in
the DOM, although empty, before clicking on "Share link", and when that
is done the proper value is set and then the input field is shown.

In the acceptance tests "getValue()" can return the value of hidden
elements too, so as long as an element exists its value is returned
without waiting for the field to be visible. Due to this if the test
code runs too fast the "I write down the shared link" step could be
executed before the proper value was set, so the shared link got in that
case would be an empty value, and this would lead to failures when the
following steps were executed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-01-09 15:57:27 +01:00
Daniel Calviño Sánchez 41a52064c0
Fix typo in callback name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-01-09 15:57:23 +01:00
Morris Jobke 607f699259
Properly catch InvalidTokenException for better error response
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-09 11:44:52 +01:00
Morris Jobke db6b9fdb6a
Merge pull request #7745 from nextcloud/7692_12
[stable12] Don't lie about preview types
2018-01-09 11:27:53 +01:00
Roeland Jago Douma 1f875eca3c
Merge pull request #7694 from nextcloud/stable12-7611
[stable12] Don't attempt to translate login names to uids when uids are provided
2018-01-08 21:10:11 +01:00
Roeland Jago Douma 50b880edeb
Don't lie about the preview mimetype
For legacy reasons we stored all the previews with a png extention.
However we did not put png data in them all the time.

This caused the preview endpoints to always report that a preview is a
png file. Which was a lie.

Since we abstract away from the storage etc in the previewmanager. There
is no need anymore to store them as .png files and instead we can use
the actual file extention.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-08 20:39:39 +01:00
Arthur Schiwon e489a1a7c8
removes invalid tests, adapts another one
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-04 11:49:29 +01:00
Arthur Schiwon 776d9e6805
never translate login names when requiring with a user id
where appropriate, the preLoginNameUsedAsUserName hook should be thrown.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-04 11:47:31 +01:00
Arthur Schiwon c94c2c48a6
extend tests for status quo
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-04 11:47:21 +01:00
John Molakvoæ (skjnldsv) 51cc76b80d
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-01-04 08:35:38 +01:00
John Molakvoæ (skjnldsv) 1ae126a781
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-01-03 22:05:03 +01:00
John Molakvoæ (skjnldsv) 9fa49c7f24
Correctly remove temp test directory tree
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-01-03 22:05:03 +01:00
John Molakvoæ (skjnldsv) 87b1839cd1
Added tests for various installations types
- With root installation
 - Core css
 - App inside server root
 - Secondary apps directory outside server root
- With an installation in a sub directory
 - Core css
 - App inside server root
 - Secondary apps directory outside server root

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-01-03 22:05:02 +01:00
John Molakvoæ (skjnldsv) 00412d1c8c
Fixed webroot for scss files
Fixed tests

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-01-03 22:04:59 +01:00
Joas Schilling 903d7fcd6a
Unit tests for #6977
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-03 10:46:30 +01:00
Christoph Wurst 85c18f5980
Fix duplicate session token after remembered login
On a remembered login session, we create a new session token
in the database with the values of the old one. As we actually
don't need the old session token anymore, we can delete it right
away.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-12-19 09:17:06 +01:00
Morris Jobke 6859e5a22a
Merge pull request #7558 from nextcloud/12-7427
[stable12] Fix email buttons for white theme
2017-12-18 21:19:51 +01:00
Morris Jobke e726d191f1
Fix email buttons for white theme
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-12-18 17:03:01 +01:00
Morris Jobke 3a99ef5286
Merge pull request #7464 from nextcloud/cached-mount-info-filepath-12
[12] Allow getting the filepath when getting cached mounts by fileid
2017-12-13 13:28:25 +01:00
Bjoern Schiessle 003c709d25
allow 'Nextcloud' in the user agent string of Android
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-12-12 14:38:36 +01:00
Robin Appelman 3ec1bbbde8
Allow getting the filepath when getting cached mounts by fileid
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-12-12 14:11:40 +01:00
Morris Jobke 90feccf4be
Merge pull request #7328 from nextcloud/backport/7327/access-list-regression-for-not-current-accesss
[stable12]  Only in case of $currentAccess the array uses the id as index
2017-11-28 20:16:32 +01:00
Joas Schilling 3cbd6509e0
Fix current access list test and add one for $currentAccess === false
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-28 17:24:12 +01:00
Kyle Fazzari 7f8f3dc21b
CSSResourceLocator: handle SCSS in apps outside root
Currently static CSS files work fine in apps outside of the root.
However, as soon as an app uses SCSS, Nextcloud starts being unable to
find the web root.

Fix this problem by backporting select snippets from master
specifically targeting this issue, and add a test to ensure it doesn't
regress.

Fix #5289

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2017-11-22 21:41:40 -08:00
Kyle Fazzari 697774112f
{J,CS}SResourceLocator: account for symlinks in app path
Currently, if the app path includes a symlink, the calculated webDir
will be incorrect when generating CSS and URLs will be pointing to the
wrong place, breaking CSS.

Use realpath when retrieving app path, and these issues go away.

Fix #6028

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2017-11-14 09:22:33 -08:00
blizzz 14986e0f5c
Merge pull request #6464 from nextcloud/proper-english-nowhave-backport-stable12
[stable12] Improve text: 'you have now' -> 'you now have'
2017-11-10 15:48:37 +01:00
Morris Jobke d8cf19b258
Fix welcome text for better grammar in themed instances
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-09 09:28:29 +01:00
Julius Härtl fa380c0b53
Theming: theme flow redirection page
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-11-08 21:20:26 +01:00
Morris Jobke 21b8399e88
Improve mimetype detection for object storages
Object storage instances always fall back to the content based mimetype detection, because the file name for object storage was always random due to the fact that it was temporarily storage in a generated temp file. This patch adds a check before that to make sure to use the original file name for this purpose and also remove possible other extensions like the versioning or part file extension.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 15:23:35 +01:00
Morris Jobke 9b41236d4a
Provide tests for future timestamp formatting
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-23 15:42:14 +02:00
Bjoern Schiessle 7aaf12b37d
fix url
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-10-17 11:27:06 +02:00
Robin Appelman df2fa2fce2 Merge pull request #6737 from nextcloud/aws-sdk-12
[12] Update aws sdk + s3 improvements
2017-10-09 18:05:16 +02:00
Robin Appelman 239f561ab2
Add tests for multipart upload
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-10-09 15:29:44 +02:00
Robin Appelman 95dc9a89b3
dont run invalid path repair step when upgrading from 11.0.5.2 and later
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-10-03 16:28:54 +02:00