Commit Graph

169 Commits

Author SHA1 Message Date
Roeland Jago Douma 4a292126e5
Merge pull request #20139 from nextcloud/unify-default-value-for-restricting-user-enumeration-with-settings
Unify default value for restricting user enumeration with settings
2020-04-04 10:33:04 +02:00
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
2020-03-27 17:14:08 +01:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Daniel Calviño Sánchez 4ec370016f Add acceptance test for restricting user enumeration to groups
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-24 14:42:52 +01:00
Daniel Calviño Sánchez 9386f24ab0 Add acceptance test for accepting an incoming share
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-20 20:03:58 +01:00
Daniel Calviño Sánchez 887e740434 Fix timeout capping
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-20 17:43:12 +01:00
Daniel Calviño Sánchez 43e18e96e2 Revert (partially) "Accept incoming shares in acceptance tests"
This reverts commit f402e23448.

Since eb4c42d3d1 now shares are accepted
by default, so no notification is shown to accept them.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-20 17:39:34 +01:00
GretaD 455013c309
fix the folder share
Signed-off-by: GretaD <gretadoci@gmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-12-19 16:14:47 +01:00
Greta Doci c864bc8321
Move users management to multi line
Signed-off-by: Greta Doci <gretadoci@gmail.com>
2019-12-12 12:25:13 +01:00
Julius Härtl 0c6c12deae
Adjust tags acceptance tests to moved admin section
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-28 18:26:15 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Daniel Calviño Sánchez f402e23448 Accept incoming shares in acceptance tests
Incoming shares are no longer automatically added to the file list of
the sharee. Instead, the user now needs to explictly accept the share.

Currently shares can be accepted only from the Notifications app, so it
must be explicitly cloned before installing Nextcloud if it is not found
in the "apps" directory. Note that the development branches are already
built, so there is no need to explicitly build the app.

With the new sharing behaviour the "share a skeleton file with another
user before first login" scenario is no longer valid (as the user will
need to log in to accept the share, so at that point the skeleton is
already created), so it was removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-11-20 21:15:46 +01:00
Daniel Calviño Sánchez 0abff19aa9 Rename "Notification" to "Toast"
Since Nextcloud 17 the proper name for the old built-in notifications is
"Toast". Moreover, this will reduce ambiguity when using the
"notification" term to refer to elements in the Notifications app.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-11-20 21:15:46 +01:00
John Molakvoæ (skjnldsv) 12eba18bdf Adjust acceptance tests to new OCA.Sidebar
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-29 13:20:08 +01:00
John Molakvoæ (skjnldsv) 4293ede565
Fix tag acceptance tests after #16682
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 07:48:45 +02:00
John Molakvoæ (skjnldsv) f737dc9a86 Remove input id on login form
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-09-28 08:15:03 +00:00
Greta Doci 1993984769 Adjust acceptance tests to changes in link share menu behaviour
Now the link share menu is not automatically opened after a link share
is created, so waiting until it was opened failed in iShareTheLinkFor.

Note that the steps that interact with the link share menu take care
themselves of showing the menu if needed, so there is no need to
explicitly show it despite the change. Also, the waiting in
iShareTheLinkFor was introduced when the link share menu was changed
to automatically open after creating a link share, as that caused some
issues with the steps that opened the menu by themselves (fec8d12fc5).
Due to all this, now that the link share menu is again not automatically
opened the wait can be simply removed.

Signed-off-by: Greta Doci <gretadoci@gmail.com>
2019-08-29 10:19:03 +02:00
Daniel Calviño Sánchez e5a305b9d8 Allow Context subclasses in acceptance tests to access parent actor
Although uncommon, in some cases a Context may need to be extended (for
example, to override a step defined in the server with a specific
behaviour in the acceptance tests of an app); in those cases the
subclass should be able to access the actor attribute defined in the
Context it is extending.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-08-16 08:20:41 +02:00
John Molakvoæ b3bfae8cfe
Adjust acceptance tests to notifications based on toastify (#15938)
Adjust acceptance tests to notifications based on toastify
2019-06-13 14:04:50 +02:00
Daniel Calviño Sánchez e65fd11419 Add messages to assertFalse/True to clarify the failed assertion
Otherwise the output would just read "Failed asserting that true is
false." or "Failed asserting that false is true.", which is not very
informative when there are several assertFalse/True in a row.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-06-12 15:32:40 +02:00
Daniel Calviño Sánchez df8406dbae Adjust acceptance tests to notifications based on toastify
The old notifications were added as ".row" elements to the
"#notification-container" element; the new notifications based on
toastify are added as ".toastify .on .toast..." elements to the
"#content" element. Besides that, they also include a span element with
an X to close the notification, so now only the first child text node
should be compared to the expected message.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-06-12 14:32:15 +02:00
Joas Schilling 8852b85d13
Disable acceptance test which should fail anyway
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-04-11 14:03:41 +02:00
Julius Härtl 0968343061
Add acceptance test for public folder navigation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-04-10 11:28:45 +02:00
Daniel Calviño Sánchez ace4449924 Adjust acceptance tests to changes of file names in file picker
File names are no longer shown directly in the ".filename" element, but
split in two "span" elements inside a ".filename-parts" element, so now
the texts in those span elements need to be concatenated to get the file
name.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-04-03 16:29:52 +02:00
Roeland Jago Douma 49acc28d90
Revert "Temp disable bundle tests" 2019-04-01 22:43:59 +02:00
Roeland Jago Douma 093c75802c
Temp disable bundle tests
The bundle acceptance tests fails after #14578 sometimes. This is
because of a race condition. not all apps have compatible 16 versions
yet. So trying to enable them results in those apps doing 💥.

Because of #14578 we do show them now. So we try to enable them. However
depending on which requests finishes first the disable button for the
audit app either shows up or now.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-20 20:44:11 +01:00
Morris Jobke 970d52fc29
Adjust acceptance tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-18 14:16:40 +01:00
Morris Jobke 1d938947e1
Disable failing files app test - act 4
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-14 16:30:38 +01:00
Morris Jobke 951dcc110d
Disable failing files app test - act 3
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-14 16:24:06 +01:00
Morris Jobke 70f90b8c6b
Disable failing app management test
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-14 16:18:46 +01:00
Morris Jobke caea04d28e
Disable failing comments app test - act 2
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-14 13:46:10 +01:00
Morris Jobke 43e9006481
Disable failing files app test - act 2
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-14 13:46:06 +01:00
Morris Jobke 38dd3da92b
Disable fragile user acceptance tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 18:01:24 +01:00
Morris Jobke a5e42f95c6
Disable failing login test
* tests/acceptance/features/login.feature:15
<details><summary>Show full log</summary>

```
  Scenario: log in with valid user and invalid password once fixed by admin # /drone/src/github.com/nextcloud/server/tests/acceptance/features/login.feature:15
    Given I act as John                                                     # ActorContext::iActAs()
    And I can not log in with user user0 and password 654231                # LoginPageContext::iCanNotLogInWithUserAndPassword()
    When I act as Jane                                                      # ActorContext::iActAs()
    And I am logged in as the admin                                         # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                            # SettingsMenuContext::iOpenTheUserSettings()
    And I set the password for user0 to 654321                              # UsersSettingsContext::iSetTheFieldForUserTo()
    And I act as John                                                       # ActorContext::iActAs()
    And I log in with user user0 and password 654321                        # LoginPageContext::iLogInWithUserAndPassword()
    Then I see that the current page is the Files app                       # FilesAppContext::iSeeThatTheCurrentPageIsTheFilesApp()
      Failed asserting that 'http://acceptance-login/index.php/login?user=user0' starts with "http://acceptance-login/index.php/apps/files/".

```
</details>

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 18:01:24 +01:00
Morris Jobke 18009c82e4
Disable failing comments test
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 18:01:24 +01:00
Morris Jobke 247ade00e7
Disable failing files app test
Fails with:

 * tests/acceptance/features/app-files.feature:90
<details><summary>Show full log</summary>

```
  Scenario: show favorites                                            # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:90
    Given I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I mark "welcome.txt" as favorite                              # FileListContext::iMarkAsFavorite()
    When I open the "Favorites" section                               # AppNavigationContext::iOpenTheSection()
    Then I see that the current section is "Favorites"                # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    Then I see that the file list contains a file named "welcome.txt" # FileListContext::iSeeThatTheFileListContainsAFileNamed()
      Row for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)
```
</details>

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 18:01:24 +01:00
Morris Jobke d98463f1b2
Disable failing apps management test
Fails with:

 * tests/acceptance/features/apps.feature:66
<details><summary>Show full log</summary>

```
  Scenario: Show section from app store                       # /drone/src/github.com/nextcloud/server/tests/acceptance/features/apps.feature:66
    Given I act as Jane                                       # ActorContext::iActAs()
    And I am logged in as the admin                           # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the Apps management                            # SettingsMenuContext::iOpenTheAppsManagement()
    And I see that the current section is "Your apps"         # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    When I open the "Files" section                           # AppNavigationContext::iOpenTheSection()
      Files section item in App Navigation could not be found after 100 seconds (NoSuchElementException)
    Then I see that there some apps listed from the app store # AppsManagementContext::iSeeThatThereSomeAppsListedFromTheAppStore()
    And I see that the current section is "Files"             # AppNavigationContext::iSeeThatTheCurrentSectionIs()

```
</details>

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 18:01:24 +01:00
Morris Jobke 982081f1ab
Disable failing files tag test
Fails with:

 * tests/acceptance/features/app-files-tags.feature:42
<details><summary>Show full log</summary>

```
  Scenario: add tags using the dropdown in the details view                                 # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-tags.feature:42
    Given I am logged in as the admin                                                       # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I visit the settings page                                                           # SettingsMenuContext::iVisitTheSettingsPage()
    And I open the "Tag management" section                                                 # AppNavigationContext::iOpenTheSection()
    And I see that the button to select tags is shown                                       # SettingsContext::iSeeThatTheButtonToSelectTagsIsShown()
    And I create the tag "tag1" in the settings                                             # SettingsContext::iCreateTheTagInTheSettings()
    And I create the tag "tag2" in the settings                                             # SettingsContext::iCreateTheTagInTheSettings()
    And I create the tag "tag3" in the settings                                             # SettingsContext::iCreateTheTagInTheSettings()
    And I create the tag "tag4" in the settings                                             # SettingsContext::iCreateTheTagInTheSettings()
    And I see that the dropdown for tags in the settings eventually contains the tag "tag1" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
    And I see that the dropdown for tags in the settings eventually contains the tag "tag2" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
    And I see that the dropdown for tags in the settings eventually contains the tag "tag3" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
    And I see that the dropdown for tags in the settings eventually contains the tag "tag4" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
    And I log out                                                                           # SettingsMenuContext::iLogOut()
    And I am logged in                                                                      # LoginPageContext::iAmLoggedIn()
    And I open the details view for "welcome.txt"                                           # FileListContext::iOpenTheDetailsViewFor()
    And I open the input field for tags in the details view                                 # FilesAppContext::iOpenTheInputFieldForTagsInTheDetailsView()
    When I check the tag "tag2" in the dropdown for tags in the details view                # FilesAppContext::iCheckTheTagInTheDropdownForTagsInTheDetailsView()
    And I check the tag "tag4" in the dropdown for tags in the details view                 # FilesAppContext::iCheckTheTagInTheDropdownForTagsInTheDetailsView()
    Then I see that the tag "tag2" in the dropdown for tags in the details view is checked  # FilesAppContext::iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsChecked()
    And I see that the tag "tag4" in the dropdown for tags in the details view is checked   # FilesAppContext::iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsChecked()
    And I see that the input field for tags in the details view contains the tag "tag2"     # FilesAppContext::iSeeThatTheInputFieldForTagsInTheDetailsViewContainsTheTag()
      Failed asserting that false is true.
    And I see that the input field for tags in the details view contains the tag "tag4"     # FilesAppContext::iSeeThatTheInputFieldForTagsInTheDetailsViewContainsTheTag()

```
</details>

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 18:01:24 +01:00
Morris Jobke 77cf702220
Fix acceptance tests for wrong password message due to changed message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-11 11:54:38 +01:00
Morris Jobke 40e04c8391
Disable fragile tests for now
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-05 14:23:08 +01:00
Morris Jobke 4b2efd94f9
Make header.feature more robust by running it on apache
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-04 10:22:16 +01:00
Morris Jobke 3f2bb3ca05
Run tests that fail with "no such process" over to apache server
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-02-28 14:03:57 +01:00
Morris Jobke 36bf1ffb25
Fix acceptance tests for tag management
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-02-28 11:42:21 +01:00
Daniel Calviño Sánchez 374b02c7bc Add acceptance tests for copying files to the same folder
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-22 12:51:53 +01:00
Daniel Calviño Sánchez 42457c8b23 Add acceptance tests for moving and copying selections to another folder
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-22 12:36:13 +01:00
Daniel Calviño Sánchez 4fcabf167e Add acceptance tests for moving and copying files to another folder
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-22 12:27:06 +01:00
Daniel Calviño Sánchez 4566670fa3 Add acceptance tests for opening search results for comments
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-12-21 20:14:38 +01:00
Daniel Calviño Sánchez 1a887aaad0 Add acceptance tests for searching comments
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-12-21 20:14:16 +01:00
Daniel Calviño Sánchez 6cee8ba827 Add acceptance tests for comments on shared files and folders
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-12-06 18:31:42 +01:00