Commit Graph

5768 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez ace7b9dfe1 Find directly the label instead of falling back to it
The input element is always hidden, so the check always ended falling
back to the label. Moreover, the label is the element that the user
interacts with, so it must be the one used.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:37 +00:00
Daniel Calviño Sánchez f92a216dcf Assert also element visibility instead of just finding it
Although if the element could not be found an exception would be thrown
and the test aborted if an element is in the DOM but hidden it would be
found and the test would pass.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:37 +00:00
Daniel Calviño Sánchez 30c91a7303 Add explicit locator for "Enable all" bundle button
Instead of looking for the bundle button and then checking its value now
the expected value is included in the locator and the button is checked
similarly to other elements.

No "Disable all" locator was added as it was not currently needed
anywhere.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:36 +00:00
Daniel Calviño Sánchez 00b38db77f Find elements through the actor rather than the driver
"Actor::find" is a more robust way to look for elements, as it handles
some exceptions that may be thrown. Therefore, even if the elements are
not actually used and it is only checked whether they exist or not using
the actor is the preferred way when possible (and it also makes it
consistent with the rest of the acceptance tests).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:35 +00:00
Daniel Calviño Sánchez d293751ba7 Add locator for apps list
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:35 +00:00
Daniel Calviño Sánchez 5859458c52 Fix identation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:34 +00:00
Daniel Calviño Sánchez d548d212a2 Fix delete user acceptance test
Adding some missing asserts showed that the "delete user" acceptance
test was silently failing, as the deletion was not being confirmed in
the dialog and thus the user was not being deleted.

The dialog button contains a single quote ("user0's"), so the XPath
expression had to be adjusted (it seems that it is not possible to
escape a single quote in a string enclosed in single quotes in XPath
1.0).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:33 +00:00
Daniel Calviño Sánchez dd1a554c79 Verify WaitFor::element... results with an assertion
WaitFor::element... calls only perform the waiting and return whether
the condition succeeded or not, but that result needs to be explicitly
checked to prevent further steps from being executed if the wait failed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:32 +00:00
Daniel Calviño Sánchez 8077dbf097 Add missing waits when finding elements in the acceptance tests
As no timeout was specified the elements were tried to be found just
once. This caused the steps to fail if the elements did not appear yet
in the page when they were tried to be found.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-08 07:59:32 +00:00
Joas Schilling 42e28633f5 Send emails on password reset to the displayname
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-02-18 14:35:06 +00:00
Arthur Schiwon c882bc68ba
compatibility to Nc 20
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-02-17 17:09:33 +01:00
Arthur Schiwon ca7a7a5c85
add missing changes from backport source
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-02-17 15:59:50 +01:00
Arthur Schiwon 7c449cd0ba
test: adjust expectation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-02-17 15:59:50 +01:00
Arthur Schiwon c2ba3ca0ed
add repair job for unencoded calendars
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-02-17 15:59:49 +01:00
Vincent Petry 8abd227498
Fix CI branch for notifications app
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-02-05 10:38:37 +01:00
Christoph Wurst 9010937535 Fix app fetcher php comparison to allow wider ranges
When app app specifies php 7.4 as upper limit we have to allow the
installation on php>7.4.0. The previous version check didn't do that.
This adjusts the regexes to discard any irrelevant suffix after the
three version numbers so that we can use more fine granular checks than
php's version_compare can do out of the box, like for php 7.4 we only
compare the major and minor version numbers and ignore the patch level.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-27 14:51:54 +00:00
Daniel Calviño Sánchez 26a6e46eb3 Add "composer.lock" for acceptance tests to git
As "composer.lock" was not versioned the dependencies had to be resolved
everytime that the acceptance tests run, which took some precious time.

Besides that the dependency versions were also tightened for better
control.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-01-18 11:52:30 +00:00
Arthur Schiwon b82efbdee5
DB: warn on parameter number constraints
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-14 13:03:54 +01:00
Morris Jobke fb0067a777
Merge pull request #24592 from nextcloud/backport/23912/stable20
[stable20] use in objectstore copy
2021-01-07 13:28:10 +01:00
Julius Härtl 8d9fa73371
Properly handle result when copying with failure and throw in tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-05 16:57:51 +01:00
Julius Härtl 865e4ab0ec Fix writeStream mocking
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-05 14:51:40 +00:00
Julius Härtl 3666754be7
Show unique displayname context in the sharing input
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-05 10:05:52 +01:00
Roeland Jago Douma 24fe3ee439
Merge pull request #24653 from nextcloud/backport/23044/stable20
[stable20] Handle owncloud migration to latest release
2020-12-14 15:35:00 +01:00
Julius Härtl 7ce95a4fcb
Readd repair steps that are relevant when migrating from ownCloud
This reverts commit d9b1492e03.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:12:52 +01:00
Julius Härtl ace90466d6
Add temporary test for migrating int to string
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-14 11:10:59 +01:00
Robin Appelman 694032c54c use in objectstore copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-12-07 16:07:21 +00:00
Morris Jobke b1e9752169
Revert "Do not read certificate bundle from data dir by default"
This reverts commit 18b0d753f2.
2020-12-04 13:37:10 +01:00
Roeland Jago Douma 428f0ec151 Fix vsprint parameter
%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>
2020-12-03 08:20:04 +00:00
Morris Jobke a8780debd3 Add notification for user limit
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 17:24:44 +00:00
Morris Jobke d2fd49c461 Allow subscription to indicate that a userlimit is reached
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 17:24:42 +00:00
Roeland Jago Douma 3fb850940f
Set frame-ancestors to none if none are filled
frame-ancestors doesn't fall back to default-src. So when we apply a
very restricted CSP we should make sure to set it to 'none' and not
leave it empty.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-01 22:23:13 +01:00
Arthur Schiwon c9814c716a
set the display name of federated sharees from addressbook
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-24 22:52:31 +01:00
Morris Jobke e0e3334fc2
Merge pull request #24230 from nextcloud/backport/24007/stable20
[stable20] allow selecting multiple columns with SELECT DISTINCT
2020-11-20 14:27:27 +01:00
Morris Jobke 7fa352b28c
Merge pull request #24228 from nextcloud/backport/24135/stable20
[stable20] Fix nextcloud logo in email notifications misalignment
2020-11-20 14:23:00 +01:00
Robin Appelman f65a89dd07 use file name instead of path in 'not allowed to share' message
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-19 21:44:42 +00:00
Robin Appelman 22bf656e02 allow selecting multiple columns with SELECT DISTINCT
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-19 21:41:13 +00:00
medcloud 7ccf700432 Fix #23357
Signed-off-by: medcloud <42641918+medcloud@users.noreply.github.com>
2020-11-19 20:38:54 +00:00
Daniel Calviño Sánchez 1464ace788 Add unit tests for "validateExpirationDateInternal"
They were copied and adjusted as needed from the tests for
"validateExpirationDate".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:59 +00:00
Daniel Calviño Sánchez 709abd4fc7 Add explicit time to test date for clarity
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>
2020-11-16 13:16:56 +00:00
Daniel Calviño Sánchez 731cce4542 Add unit test for expiration date with date and with default
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>
2020-11-16 13:16:55 +00:00
Daniel Calviño Sánchez 115a988cd2 Fix unit test for expiration date without date but with default
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>
2020-11-16 13:16:53 +00:00
Daniel Calviño Sánchez eaa43d22e2 Fix unit test method name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:52 +00:00
Daniel Calviño Sánchez 4e418100bf Fix unit test for verifying enforced valid expiration date.
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>
2020-11-16 13:16:51 +00:00
Daniel Calviño Sánchez 20c72ac03e Fix unit test for verifying enforced expire date too far in the future
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>
2020-11-16 13:16:49 +00:00
Daniel Calviño Sánchez 22357a72e5 Add unit tests to enforce a relaxed default share expiration date
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:48 +00:00
Daniel Calviño Sánchez b75c171ee2 Remove wrong and misleading comment
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:47 +00:00
Daniel Calviño Sánchez d6ba3b2f7c Remove extra spaces
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:45 +00:00
Daniel Calviño Sánchez 76bbbca220 Fix typo in variable name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:44 +00:00
Daniel Calviño Sánchez 446c90879f Fix typos in method names
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 13:16:42 +00:00
Joas Schilling dabed84bd4
Fix unique key in test table
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-12 12:57:52 +01:00