Commit Graph

4232 Commits

Author SHA1 Message Date
Joas Schilling 6428359820
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-05 16:04:17 +02:00
Roeland Jago Douma faffebc718
Improve 2FA
* Store the auth state in the session so we don't have to query it every
time.
* Added some tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-31 10:54:10 +02:00
Bjoern Schiessle 3e6833f5a6
add prefix to user and system keys to avoid name collisions
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-30 20:36:10 +02:00
Bjoern Schiessle 5f49398e13
extend the identity proof manager to allow system wide key pairs
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-30 20:36:10 +02:00
Lukas Reschke 5755897712
Inject \OCP\IURLGenerator to make tests work
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-30 14:42:50 +02:00
Lukas Reschke 245080e647
Properly allow \OCP\Authentication\IApacheBackend to specify logout URL
Any `\OCP\Authentication\IApacheBackend` previously had to implement `getLogoutAttribute` which returns a string.
This string is directly injected into the logout `<a>` tag, so returning something like `href="foo"` would result
in `<a href="foo">`.

This is rather error prone and also in Nextcloud 12 broken as the logout entry has been moved with
054e161eb5 inside the navigation manager where one cannot simply inject attributes.

Thus this feature is broken in Nextcloud 12 which effectively leads to the bug described at nextcloud/user_saml#112,
people cannot logout anymore when using SAML using SLO. Basically in case of SAML you have a SLO url which redirects
you to the IdP and properly logs you out there as well.

Instead of monkey patching the Navigation manager I decided to instead change `\OCP\Authentication\IApacheBackend` to
use `\OCP\Authentication\IApacheBackend::getLogoutUrl` instead where it can return a string with the appropriate logout
URL. Since this functionality is only prominently used in the SAML plugin. Any custom app would need a small change but
I'm not aware of any and there's simply no way to fix this properly otherwise.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-30 14:42:46 +02:00
Morris Jobke 37bc43c19c Enable object storage tests again
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-17 19:35:26 +02:00
Daniel Calviño Sánchez 0b00d770fe Add acceptance tests for setting the color in the Theming app
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-10 13:42:29 +02:00
Daniel Calviño Sánchez 340a774fe2 Add getter for the timeout multiplier
In some cases the acceptance tests have to explicitly wait for something
to happen without using the "find" method from the actor; in those cases
the timeout multiplier needs to be taken into account too, so the test
cases must be able to retrieve it from the actor.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-10 13:34:38 +02:00
Morris Jobke 3f8e3fbb6b Merge pull request #5946 from nextcloud/12-5897
[stable12] Send an email once a file/folder is shared with a user
2017-08-08 16:36:46 +02:00
Joas Schilling d6e902fd03
Fix last failures with oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-03 16:40:46 +02:00
Joas Schilling ae55fefcf6
Fix querybuilder and functionbuilder tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-03 16:40:35 +02:00
Joas Schilling d6b888461d
Can not insert auto increment on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-03 16:40:00 +02:00
Joas Schilling 18ba973c13
Fix missing escape on column and table name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-03 16:39:51 +02:00
Morris Jobke 1ef19bb0ec Send an email once a file/folder is shared with a user
* only if user has set an email address
* only for user shares (no group shares for now)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-01 15:17:32 +02:00
Lukas Reschke 7568b04705 Add new bundle
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-26 11:47:15 +02:00
Morris Jobke f45e4471f0 Remove unneeded styles
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-24 13:46:17 +02:00
Lukas Reschke 3353dbfab4 Adjust to height=120
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-07-24 13:46:09 +02:00
Robin Appelman 13831085c3 add tests for renaming paths with multibyte utf8 characters
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-22 11:10:37 +02:00
Morris Jobke c6e3368af7 Merge pull request #5786 from nextcloud/path-repair-steps-storage-12
[12] Also repair storage id's when repairing invalid entries
2017-07-21 14:03:38 +02:00
Daniel Calviño Sánchez fcc1570789 Add option to acceptance test runner to set the Selenium server
By default "127.0.0.1:4444" is used, so nothing needs to be set when the
acceptance tests and the Selenium server share the same network (like
when called by "run.sh").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-20 11:32:58 +02:00
Daniel Calviño Sánchez 140b23f85f Add option to acceptance test runner to set the Nextcloud server domain
By default "127.0.0.1" is used, so nothing needs to be set when the
Selenium server and the Nextcloud test server share the same network
(like when called by "run.sh").

Besides passing the domain to the acceptance tests the Nextcloud test
server configuration must be modified to see the given domain as a
trusted domain; otherwise the access would be forbidden.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-20 11:32:54 +02:00
Daniel Calviño Sánchez 9722291454 Make possible to configure the domain for the Nextcloud test server
The NextcloudTestServerLocalHelper started the PHP built-in web server
for the Nextcloud test server at 127.0.0.1; as the Selenium server has
to access the Nextcloud test server they were forced to share the same
network. Now, the domain at which the PHP built-in web server is started
can be specified when the NextcloudTestServerLocalHelper is created,
which removes the need of sharing the same network, as the Selenium
server now can access the Nextcloud test server at an arbitrary domain.
However, by default "127.0.0.1" is still used if no domain is given.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-20 11:32:50 +02:00
Robin Appelman 9c2dce34e9
Also repair storage id's when repairing invalid entries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-19 12:34:00 +02:00
Pauli Järvinen 22b29943ed Fix emitting of legacy hook post_unshare
- When a file was unshared, the legacy hook pre_unshare fired twice and the hook post_unshare did not fire at all. This was obviously a copy-paste error.

Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
2017-07-19 11:42:23 +02:00
Morris Jobke 239ff34f3d Fix drone
Fix service container host name
check current folder
fix redis for integration test
Fix more hostnames

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-14 13:02:16 +02:00
Morris Jobke 9a07f78480 Merge pull request #5710 from nextcloud/nested-permissions-mask-12
[12] Fix scan permissions with nested permissions masks
2017-07-13 23:42:15 +02:00
Morris Jobke 90972044b1 Merge pull request #5655 from nextcloud/moveFromCache-from-shared-12
[12] fix moving folders out of a cache jail
2017-07-13 16:35:57 +02:00
Morris Jobke 61bac5637f Merge pull request #5697 from nextcloud/stable12-4984
Write cert bundle to tmp file first
2017-07-13 15:08:37 +02:00
Robin Appelman 5804dfc078
Fix scan permissions with nested permissions masks
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 14:37:09 +02:00
Robin Appelman 069df4c8cb
chunk getting invalid paths and reuse queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 13:08:24 +02:00
Robin Appelman 64d0a0ffc9
adjust to moved repair step
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 13:08:23 +02:00
Robin Appelman 92b14fa8c0
Add repair step for invalid paths
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 13:08:23 +02:00
Robin Appelman 996269cfdd
fix moving folders out of a cache jail
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 13:08:23 +02:00
Roeland Jago Douma fe7c907e8c
Write cert bundle to tmp file first
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-12 20:21:27 +02:00
Daniel Calviño Sánchez 00e0535aec Add acceptance tests for unselecting items in dropdown for tags
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-11 13:02:09 +02:00
Daniel Calviño Sánchez 6cf19cc81a Extract app navigation elements to its own context
The app navigation is not exclusive to the Files app but a generic
component used by other apps too, so its locators and steps should be in
its own context.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-11 11:54:57 +02:00
Daniel Calviño Sánchez b72aa998d6 Fix typo
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-11 11:48:19 +02:00
Joas Schilling a6bae8ac44
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-07 11:16:54 +02:00
Morris Jobke 36e3f3cc2a Merge pull request #5617 from nextcloud/backport-5615-fix-navigation-entries-for-group-restricted-apps
[stable12] Don't load navigation entries of restricted apps
2017-07-07 10:46:11 +02:00
Joas Schilling 33252cda9e
Adjust tests to the old settings menu
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-06 09:30:42 +02:00
Joas Schilling 20091a21c9
Don't load navigation entries of restricted apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 15:07:56 +02:00
Julius Härtl 9fbae1a174
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-07-02 14:03:36 +02:00
Julius Härtl d9f83bac0f
Add tests and inject IRequest
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-07-02 14:03:35 +02:00
Joas Schilling 4d18757a85
Allow to force a language and set it via the ocs api
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-22 09:54:39 +02:00
Morris Jobke 4fec6dbf87 Merge pull request #5379 from nextcloud/stable12-5310-fix-tag-label-removed-when-share-view-is-opened
[stable12] Fix tag label removed when share view is opened
2017-06-13 17:32:55 -05:00
Joas Schilling 49c71bdbcb
Fix unknown share token
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-13 18:53:52 +02:00
Daniel Calviño Sánchez c9bc521532 Extract toggle visibility of a SystemTagsInfoView to its own view
The SystemTagsInfoViewToggleView is a basic view that renders a label
that, when clicked, toggles the visibility of an associated
SystemTagsInfoView.

In order to keep the view parent agnostic its attachment and detachment
to/from the MainfFileInfoView is done in the FilesPlugin.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-13 16:41:21 +02:00
Daniel Calviño Sánchez bd626a9faa Extract duplicated code to a method
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-13 16:41:20 +02:00
Daniel Calviño Sánchez f822e3af4d Add acceptance tests for showing the input field for tags
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-13 16:41:20 +02:00
Lukas Reschke d501b84c5a
Fix tests
return is not defined

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-06-12 22:21:37 +02:00
Morris Jobke 952caf8f85 Also use IMailer interface to generate the email template
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-06-06 10:48:53 -05:00
Joas Schilling b39dfe8eda adjust the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-06 08:11:35 -05:00
Björn Schießle 52f6c22954 Merge pull request #5224 from nextcloud/useful-gs-settings-stable12
[stable12] add new config switched for the global scale architecture
2017-06-02 20:18:45 +02:00
Bjoern Schiessle 6e7ff24474
add new config switched for the global scale architecture
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-06-02 11:00:08 +02:00
Arthur Schiwon c1f4191a77
emit changeUser only if there really was a change (quota, displayname)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-01 13:08:23 +02:00
Daniel Calviño Sánchez 424979c32e Update acceptance tests for issue #4921
Acceptance tests opened the details view by clicking on the middle of
the file row, but due to the changes made in issue #4921 that now opens
the file instead; this commit updates the acceptance tests to open the
details view through the "Details" item in the file actions menu.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-21 22:50:15 -05:00
Lukas Reschke 551a189ae8 Fix tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-20 17:15:19 -05:00
Lukas Reschke 7976927628 Merge pull request #4894 from nextcloud/generic-security-activities
Change 2FA activities to more generic security activities
2017-05-19 00:50:44 +02:00
Lukas Reschke 8c624bdef9 Merge pull request #4792 from nextcloud/fix-storage-wrappers-on-scanner
Make sure we use the passed-in storage when there is one
2017-05-19 00:49:58 +02:00
Roeland Jago Douma e43649e67e
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-18 22:10:57 +02:00
Christoph Wurst 1632bb4557
Move activities test code
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-05-18 22:10:57 +02:00
Lukas Reschke 7927aed991
Adjust token name
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:11 +02:00
Lukas Reschke 691646bdae
Add tests for OAuth2 app
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:10 +02:00
Lukas Reschke 59e968977c
Add test for DefaultTokenMapper
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:09 +02:00
Lukas Reschke 77827ebf11
Rename table back to lowercase
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:09 +02:00
Lukas Reschke 26ee889fec
Add tests for ClientFlowLoginController
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:08 +02:00
Bjoern Schiessle 1eb7f4956b
delete auth token when client gets deleted
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-05-18 20:49:07 +02:00
Robin Appelman 1f1e1b0d00
use unmasked permissions during scanning
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-05-18 16:38:54 +02:00
Morris Jobke 78e6c2dea4 Merge pull request #4666 from nextcloud/enable-redis-cluster
Add redis cluster tests to our CI jobs
2017-05-16 10:10:25 -05:00
Morris Jobke 3bf9503070 Merge pull request #4816 from nextcloud/Ardinis-quota-files_external
Correctly calculate used space for quota with external storage
2017-05-12 11:33:54 -05:00
Morris Jobke 51c55a867d fix quota tests for external storage
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-12 11:32:16 -05:00
Lukas Reschke 4f752ed1fc Merge pull request #4809 from nextcloud/downstream-27676
Disable reset password link
2017-05-12 12:39:07 +02:00
Lukas Reschke 48a9a4bd81 Merge pull request #4825 from nextcloud/add-timeout-appstore
Add timeout for requests to appstore
2017-05-12 12:37:18 +02:00
Joas Schilling e6a0ad4701
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-12 10:02:15 +02:00
Joas Schilling adad4281af
Fix failed assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-12 09:58:18 +02:00
Morris Jobke f73ca1b77f Add redis cluster tests to our CI jobs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-11 17:07:20 -05:00
Joas Schilling 0828df5ed4
Disable the API endpoints as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-11 17:03:57 +02:00
Joas Schilling 538d32fe87
Automatic injection into the Fetchers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:56:38 +02:00
Joas Schilling ca39940614
Automatic creation of Identity manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:45:11 +02:00
Joas Schilling d418ea550b
Automatic injection for CssController
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:42:40 +02:00
Joas Schilling 9c8fe82000
Automatic injection for JsController
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:42:15 +02:00
Morris Jobke 1a83f11925 Merge pull request #4718 from nextcloud/handle-stalled-or-invisible-elements-automatically-in-acceptance-tests
Handle stale or invisible elements automatically in acceptance tests
2017-05-08 12:52:30 -05:00
Fabrizio Steiner f2a2b34e46 Increase device password entropy. Use lower- and upper-case characters and digits, but exclude ambiguous characters. The number of digits has also been increased to 25.
Signed-off-by: Fabrizio Steiner <fabrizio.steiner@gmail.com>
2017-05-08 14:04:40 +02:00
Daniel Calviño Sánchez 9313c9797f Add automatic handling of common command failures of Mink elements
Commands executed on Mink elements may fail for several reasons.
ElementWrapper is introduced to automatically handle some of those
situations, like StaleElementReference exceptions and ElementNotVisible
exceptions.

StaleElementReference exceptions are thrown when the command is executed
on an element that is no longer attached to the DOM. When that happens
the ElementWrapper finds again the element and executes the command
again on the new element.

ElementNotVisible exceptions are thrown when the command requires the
element to be visible but the element is not. When that happens the
ElementWrapper waits for the element to be visible before executing the
command again.

These changes are totally compatible with the current acceptance tests.
They just make the tests more robust, but they do not change their
behaviour. In fact, this should minimize some of the sporadic failures
in the acceptance tests caused by their concurrent nature with respect
to the web browser executing the commands.

However, the ElementWrapper is not a silver bullet; it handles the most
common situations, but it does not handle every possible scenario. For
example, the acceptance tests would still fail sporadically if an
element can become staled several times in a row (uncommon) or if it
does not become visible before the timeout expires (which could still
happen in a loaded system even if the components under test work right,
but obviously it is not possible to wait indefinitely for them).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Daniel Calviño Sánchez 64f9c56224 Extract element finding to a command object
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Daniel Calviño Sánchez 7642a4b727 Make internal find methods static
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Daniel Calviño Sánchez 16e3e81635 Add missing type hints
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Morris Jobke 0896d2b006 Make cache tests a bit more clear
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-04 19:37:40 -03:00
Mario Danic e4aac15a92
Update login flow redirection
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-04 19:21:22 +02:00
Morris Jobke 61379c9165 Merge pull request #4682 from nextcloud/try-to-start-browser-sessions-again-when-they-fail-in-acceptance-tests
Try to start browser sessions again when they fail in acceptance tests
2017-05-04 00:02:18 -03:00
Daniel Calviño Sánchez 4fc9a7146b Add option to acceptance test runners to set a custom timeout multiplier
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 23:18:40 +02:00
Daniel Calviño Sánchez b10478ff19 Try again to start browser sessions when they fail
Starting a session for an Actor can fail, typically, due to a timeout
connecting with the web browser. Now if the session fails to start it
will be tried again up to "actorTimeoutMultiplier" times in total before
giving up.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 23:18:40 +02:00
Daniel Calviño Sánchez e355e953b5 Generalize attribute name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 12:45:52 +02:00
Daniel Calviño Sánchez 97bedb94af Fix exponential increase of timeout when finding ancestor elements
The timeout passed to the "find" method was multiplied by the
"findTimeoutMultiplier" attribute. However, as "find" used
"findAncestor" and "findAncestor", in turn, used "find" itself the
timeout was increased exponentially for ancestor elements. Now "find"
was split in "find" and "findInternal"; the first method is the public
one and modifies the given parameters as needed and then calls the
second method, private, that performs the find itself.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 12:34:04 +02:00
Morris Jobke dbe11916fa Merge pull request #4662 from nextcloud/remove-named-selectors-from-acceptance-tests
Remove named selectors from acceptance tests
2017-05-02 20:44:23 -03:00
Morris Jobke f233e856bf Merge pull request #4665 from nextcloud/enable-redis
Add redis support to our CI jobs
2017-05-02 17:16:19 -03:00
Roeland Jago Douma 24ff230f93 Merge pull request #4620 from nextcloud/preview-error-handling
better handling of preview generation errors
2017-05-02 21:49:14 +02:00
Morris Jobke ecb369b5e8
Add redis support to our CI jobs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-02 15:55:42 -03:00
Lukas Reschke 121cb4bcfc Merge pull request #4659 from nextcloud/fix/ignore-empty-email-contacts-menu
Do not show an email action for contacts with emtpy email addresses
2017-05-02 17:02:16 +02:00