Commit Graph

516 Commits

Author SHA1 Message Date
Christoph Wurst d6d8e9215c
Add a trashbin for calendars and calendar objects
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-31 07:49:19 +02:00
Joas Schilling 3b6b4c8509
Add integration tests for the editable fields
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-27 14:56:22 +02:00
szaimen 35d978c2fc Rename External storages to External storage
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-05-20 12:13:04 +02:00
Morris Jobke 77a4368418
Merge pull request #26846 from nextcloud/followup/26572/reply-with-json-when-not-accepting-html
Reply with json when not accepting html on LoginException
2021-05-17 09:36:18 +02:00
Joas Schilling b6c6527705
Fix unauthorized OCS status in provisioning
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-12 08:16:07 +02:00
Joas Schilling a2d5d2d613
Reply with UNAUTHORIZED like on APIs when login exception was thrown
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-12 08:02:53 +02:00
Joas Schilling c52a026f55
Merge pull request #26572 from nextcloud/bugfix/noid/throw-401-when-authentication-is-provided-and-invalid
Throw "401 Unauthenticated" when authentication is provided but invalid
2021-04-27 14:37:28 +02:00
Daniel Calviño Sánchez e2c4a174f2 Add integration tests for searching users in contacts menu
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-23 11:44:42 +02:00
Joas Schilling 83e10b7a73
Adjust integration test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-22 15:43:57 +02:00
Vincent Petry 98e4ac39bc
Int tests for provisioning API scopes
Added integration tests for the scope attributes in the provisioning
API.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:10 +01:00
John Molakvoæ (skjnldsv) 15767643f2
Fix sharebymail tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-03-22 06:50:47 +01:00
John Molakvoæ (skjnldsv) a100186e5e
Sharing link & mail parity
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-03-22 06:50:45 +01:00
Morris Jobke 6401d88283
Merge pull request #25331 from nextcloud/fix-valid-storages-removed-when-cleaning-remote-storages
Fix valid storages removed when cleaning remote storages
2021-03-18 08:57:09 +01:00
Joas Schilling 1683e0289b
Also execute the new tests on drone
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 19:10:24 +01:00
Joas Schilling 5b53b6f977
Add a setting to restrict returning a full match unless in phonebook or same group
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 17:25:57 +01:00
Joas Schilling a310a2adc7
Add integration tests for autocomplete/get (similar to sharees API)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 17:19:56 +01:00
dependabot-preview[bot] eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 13:31:24 +01:00
Daniel Calviño Sánchez 3aba5b27be Add integration tests for "sharing:cleanup-remote-storages" OCC command
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-01-26 11:06:33 +01:00
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +01:00
Daniel Calviño Sánchez 28f2d0ec7a Make integration tests work with both PHP 7.3 and 7.4
The "Trashbin" and "WebDav" traits were using each other in a circular
dependency ("WebDav" -> "Sharing" -> "Provisioning" -> "BasicStructure"
-> "Trashbin" -> "WebDav"). In PHP 7.3 this worked fine, but in PHP 7.4
the fatal error "Trait 'WebDav' not found in .../Trashbin.php" was
thrown. To solve this now the "TrashBin" trait no longer explicitly uses
"WebDav".

However, due to this change, the class using "TrashBin" is now expected
to also use "WebDav". As the "Trashbin" trait was not needed by most
contexts using the "BasicStructure" trait "Trashbin" was removed from it
and added only to those contexts that actually need it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-12-30 06:01:38 +01:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Joas Schilling 86a3b7e7bf
Merge pull request #24486 from nextcloud/feature/noid/phone-number-validation
Phone number validation and search
2020-12-08 17:05:38 +01:00
Joas Schilling d0750df20c
Unit tests for searching by phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling 46b073d7ce
Add a config for default region of phone numbers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling 689e3a502d
Add an integration test for the phone search API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Daniel Calviño Sánchez b4b3276a5b Add integration tests for getting guest avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-12-07 04:48:00 +01:00
Daniel Calviño Sánchez 1552add4ca Add integration tests for resized user avatars
Even on solid color images the resizing can cause some small artifacts
that slightly modify the color of certain pixels. Due to this now the
color comparison is no longer strict but fuzzy.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-12-07 04:48:00 +01:00
Daniel Calviño Sánchez 2cc22a06b4 Add integration tests for user avatars
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-12-07 04:47:56 +01:00
Daniel Calviño Sánchez 184742e6ff Make possible to set body in requesttoken requests in integration tests
"sendingAToWithRequesttoken" needs to be used to test some non OCS
endpoints which require the request token to be sent in the request. Now
it is possible to specify the body (or, rather, additional contents
beside the cookies and the request token) for those requests, as it will
be needed for example to upload an avatar.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-12-07 04:32:00 +01:00
Daniel Calviño Sánchez b553b43b68 Make possible to send requests as anonymous users in integration tests
Until now requests always had "auth" headers either for an admin or a
regular user, depending on the value of "currentUser". Now, if
"currentUser" starts by "anonymous" no "auth" header is sent, which
makes possible to also test requests with users not logged in.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-12-07 04:32:00 +01:00
Roeland Jago Douma 9163790b7c
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-11-18 10:13:36 +01:00
Daniel Calviño Sánchez 28c57004dd Add integration tests for creating shares with default expiration dates
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 08:54:19 +01:00
Daniel Calviño Sánchez 4f5271acf9 Reset app configs by deleting the values instead of setting the defaults
This avoids the need to keep the default values in the integration tests
in sync with the code, and also makes possible to reset values with
"dynamic" defaults (defaults that depend on other values).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 08:54:19 +01:00
Daniel Calviño Sánchez ee852d7e0e Add integration tests for default share permissions
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-11 02:31:25 +01:00
dependabot-preview[bot] d2aeeddce7
Update behat/behat requirement in /build/integration
Updates the requirements on [behat/behat](https://github.com/Behat/Behat) to permit the latest version.
- [Release notes](https://github.com/Behat/Behat/releases)
- [Changelog](https://github.com/Behat/Behat/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Behat/Behat/compare/v3.7.0...v3.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-07 02:40:59 +00:00
Joas Schilling 92be66cff2
Fix the expected output
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-27 09:11:36 +01:00
Joas Schilling c5d0c8ce12
Simplify the function looking for output
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-27 09:11:19 +01:00
Joas Schilling dd3d5829e7
This is not javascript
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-26 17:06:32 +01:00
Joas Schilling 46e3ea4e41
Fix undefined variable
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-26 16:37:54 +01:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Daniel Calviño Sánchez 7b9a40b407 Add integration tests to check that only the given path is transferred
Until recently (it was fixed in ac2999a26a) when a path was transferred
other shares with the target user were removed, so a test was added to
ensure that it does not happen again.

Besides that a test to ensure that other files with the target user are
not transferred was added too (it did not fail before, but seemed
convenient to have that covered too :-) ).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-09-18 18:35:06 +02:00
Daniel Calviño Sánchez c4c602ee80 Add integration tests for transferring files of a user with a risky name
The files:transfer-ownership performs a sanitization of users with
"risky" display names (including characters like "\" or "/").

In order to allow (escaped) double quotes in the display name the
regular expression used in the "user XXX with displayname YYY exists"
step had to be adjusted.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-09-18 18:34:30 +02:00
Daniel Calviño Sánchez 5e143845cb Add integration test for transferring the path of a single file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-09-18 18:32:23 +02:00
Morris Jobke 1c9a898875
Merge pull request #22761 from nextcloud/extend-integration-tests-for-files-transfer-ownership-command
Extend integration tests for "files:transfer-ownership" command
2020-09-14 17:50:53 +02:00
Daniel Calviño Sánchez 58d57b35ea Add integration tests for transferring ownership of reshares
Currently only transferring ownership of a reshare with a group to a
user in the group is possible.

When transferring ownership of a reshare with another user or with a
group to a user not in the group restoring the share fails (but the
command succeeds, it only fails for the specific files that are
reshares).

When transferring ownership of a path that is a reshare the command
fails (as when a specific path is provided the path tries to move the
file, it does not take into account reshares).

The added integration tests reflect the above behaviours.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-09-10 04:34:33 +02:00
Daniel Calviño Sánchez 0ce8096839 Check share ownership after transferring file ownership
The integration tests did not verify that the shares were actually
transferred between the users (or that they were removed due to being
transferred to the sharee).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-09-10 04:24:16 +02:00
Daniel Calviño Sánchez d3d01d6355 Check whether file exists or not after transferring ownership
The integration tests did not verify that the files were actually
transferred between the users, only that the files were downloadable.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-09-10 04:18:53 +02:00
dependabot[bot] 94b228dca1
Update behat/behat requirement in /build/integration
Updates the requirements on [behat/behat](https://github.com/Behat/Behat) to permit the latest version.
- [Release notes](https://github.com/Behat/Behat/releases)
- [Changelog](https://github.com/Behat/Behat/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Behat/Behat/compare/v3.6.1...v3.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 06:37:56 +00:00
Christoph Wurst 1f7f93a695
Update license headers for Nextcloud 20 (again)
There are still lots of outdated headers, so time for another round of
updates.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 14:37:44 +02:00
Jacob Neplokh e8a4feb1c6
Change Content-Disposition Header
- Make ALLOWED_CONTENT_TYPES public in order to use
- Add $fileName variable which uses "$node->getName()" to get the proper file name and "$file->getMimeType()" along with the ALLOWED_CONTENT_TYPES array in PhotoCache.php to get the proper file extension
- Make "$fileName" the name of the file in the Content-Disposition header when downloading a Contact's photo
- Add filename to the CardDAV integration image export test header
- Change headers in ImageExportPluginTest to reflect changes

Signed-off-by: Jacob Neplokh <me@jacobneplokh.com>
2020-09-05 11:46:25 -07:00