Commit Graph

194 Commits

Author SHA1 Message Date
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
Morris Jobke 217002701e
Merge pull request #12649 from nextcloud/make-acceptance-tests-for-comments-more-robust
Make acceptance tests for comments more robust
2018-11-26 11:23:01 +01:00
Daniel Calviño Sánchez 65263817d0 Wait for the comment to be added before changing to another file
If the server is too slow, changing to a different file immediately
after sending a new comment but without waiting for the comment to be
shown for the original file could cause the new comment to be shown for
the current file instead.

This is, indeed, a bug in the comments. However, it is not possible to
test it reliably in the acceptance tests, as it depends on how fast the
server adds the message and how fast the client changes to a different
file; sometimes the test would fail and sometimes it would not.

Therefore, now it is waited for the comment to be added before changing
to another file, as in this case it can be reliably tested that changing
to a different file does not cause the comments from the previous file
to be shown in the current file (this was a different bug already fixed
and due to which this test was added in the first place).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-24 18:16:09 +01:00
Daniel Calviño Sánchez d5725cb3d9 Wait for the empty content element to be shown
When the "Comments" tab is open the empty content element is always in
the DOM, although it is only shown once the message collection was
fetched and there were no messages. Due to this it is necessary to
explicitly wait for it to be shown instead of relying on the implicit
wait made to find the element; otherwise it would be found immediately
and if the collection was not fetched yet it would not be visible,
causing the test to fail.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-24 18:06:20 +01:00
Daniel Calviño Sánchez 4d4032bca3 Rename "FilesSharingAppContext" to "PublicShareContext"
Having both "FilesAppSharingContext" and "FilesSharingAppContext" was
confusing, so "FilesSharingAppContext" was renamed to a more descriptive
name.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:16 +01:00
Daniel Calviño Sánchez 87d4fb777a Extract locators and steps for sharing in Files app to their own context
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:16 +01:00
Daniel Calviño Sánchez d6c053f6a3 Extract sharing related acceptance tests to their own feature files
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00
Daniel Calviño Sánchez 75b734ec98 Add acceptance tests for folders that can not be reshared
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00
Daniel Calviño Sánchez d9ad31bd7f Add acceptance tests for resharing a folder with another user
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00
Daniel Calviño Sánchez 563454b741 Add acceptance test for checking that the owner can see reshares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00
Daniel Calviño Sánchez 7aaf5e6a4c Add acceptance test for resharing a file with another user
To reshare a file there must be at least three enabled users in the
system; although it would be possible to run the steps to create a third
user in the scenarios that need it for convenience a third enabled user
besides "admin" and "user0" was added to the default setup.

In a similar way, a new step was added too to login as a given user
name, similar to the steps to log in as "user0" and as "admin".

Finally, another actor, "Jim", was introduced for those scenarios which
should be played by three standard actors (that is, without a special
configuration like "Rubeus").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00
Daniel Calviño Sánchez f2f073a304 Add acceptance tests for sharing a folder with another user
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00
Daniel Calviño Sánchez aa695dca0d Add acceptance tests for sharing a file with another user
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:08 +01:00
Daniel Calviño Sánchez 1d1708688f Add acceptance tests for showing again the input field for tags
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-22 05:26:45 +01:00
Daniel Calviño Sánchez 57ffa9ea73 Add acceptance tests for opening and closing again the details view
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-22 05:26:01 +01:00
Daniel Calviño Sánchez 94645ed754 Add acceptance tests for marking a file as favorite in the details view
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-22 05:25:12 +01:00
Daniel Calviño Sánchez 139e2218d1 Add acceptance tests for switching to the comments of another file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-22 05:20:26 +01:00
John Molakvoæ (skjnldsv) 2b7832d0c9
Fix breakpoint and shrinking of the content + list
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-14 17:19:35 +01:00
Daniel Calviño Sánchez b5977bef2e Adjust acceptance tests to changes in public share page menu
The "Download" item in the menu of public share pages is no longer shown
in wide (>768px) windows (although the element is in the DOM and shown
if resized to a narrow window).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-08 13:19:15 +01:00
Roeland Jago Douma 927130ef34
Merge pull request #12215 from nextcloud/wait-for-the-link-share-menu-to-open-in-acceptance-tests
Wait for the link share menu to open in acceptance tests
2018-11-02 19:35:32 +01:00
Daniel Calviño Sánchez fec8d12fc5 Wait for the link share menu to open in acceptance tests
In the acceptance tests the link share menu is automatically opened if
needed before interacting with an item in the menu; if the menu is not
open it is opened by clicking on its toggle.

However, since a recent change the link share menu is automatically
opened by the regular UI after the link share is created. This causes
that, sometimes, after the creation of a link share the acceptance tests
check whether the menu is shown or not before the menu was automatically
opened; as the menu is not open then the acceptance tests proceed to
click on the toggle, but in the meantime the link share was created and
the menu opened, so clicking on the toggle now closes it. As the menu is
closed it is not possible to interact with its items and the test fails.

To prevent that now the acceptance tests wait for the link share menu to
open after a link share is created before continuing with the other
steps.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-02 14:24:52 +01:00
Daniel Calviño Sánchez f57b07e2c2 Add acceptance test steps to be used from Talk acceptance tests
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-02 13:30:22 +01:00
Daniel Calviño Sánchez a784e1fcc1 Test that "Password protect by Talk" is not shown if Talk is not enabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-02 13:30:22 +01:00
Daniel Calviño Sánchez b23289da1a Adjust acceptance tests to changes in link shares
Although now it is possible to create several link shares the acceptance
tests currently handles only the first link share; this first link share
is now created by clicking an "Add new share" button instead of a
checkbox.

Besides that, the "Copy link" button has been moved from the menu to the
row, next to the menu trigger.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-01 21:33:10 +01:00
Daniel Calviño Sánchez d4f39a9033 Add acceptance tests for hiding download in link shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-30 15:18:55 +01:00
Daniel Calviño Sánchez 565556b277 Move acceptance tests that crash the PHP built-in server to Apache
The PHP built-in server can crash when certain actions are performed in
Nextcloud (but although the crash is triggered by Nextcloud it does not
seem to be a Nextcloud bug), which can lead to failures in the
acceptance tests that would have otherwise passed.

A crash of the PHP built-in server during an acceptance test can be
identified by the message "sh: 1: kill: No such process" in the
acceptance tests output; as the PHP built-in server crashed its process
does no longer exist when it is tried to be killed when the scenario
ends.

Although the crash has been observed in other tests too it is more
prevalent in the tests for tags and the theming app. In order to
reduce the false positives those tests are now run on Apache instead of
on the PHP built-in sever. However, the rest of tests are still run on
the PHP built-in server due to its lower resource consumption.

In order to run a feature or just a scenario using Apache it has to be
tagged with "@apache"; features or scenarios without that tag (the
default) will run on the PHP built-in server instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-29 12:38:42 +01:00
Daniel Calviño Sánchez 95dc2ad13c Extract acceptance tests for tags to their own feature file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-29 08:40:05 +01:00
Daniel Calviño Sánchez f844799d9b Move the browser window of an actor to the foreground when acting as him
Each time a new actor appears in a scenario the browser window of the
new actor is put in front of the browser windows of the previous actors.
Before, when acting again as a previous actor his browser window stayed
in the background; in most cases everything worked fine even if the
window was in the background, but due to a bug in the Firefox driver of
Selenium and/or maybe in Firefox itself when the window was in the
background it was not possible to set the value of an input field that
had a range selected.

Now, when acting again as a previous actor his browser window is brought
to the foreground. This prevents the bug from manifesting, but also
reflects better how a user would interact with the browser in real life.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-26 11:07:13 +02:00
Daniel Calviño Sánchez 779000eb13 Add acceptance tests for opening a section in the Files app
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-21 20:21:59 +02:00
Jan-Christoph Borchardt 9b8e884b19
Change wording of 'Copy URL' to more understandable 'Copy link'
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-10-01 11:02:12 +02:00
John Molakvoæ (skjnldsv) f5f31e221c
Fix class selector for acceptance tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-09-28 08:20:10 +02:00
Roeland Jago Douma 1fecea6c08
Also test enabling of the Antivirus App for files
Since there is no calendar release for 15 yet we should use an app that
we can quickly release for 15 as well.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-09-26 22:05:42 +02:00
Michael Weimann 55cf7c35e1
Adds an acceptance test for the users settings navigation without disabled users
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-08-14 22:28:11 +02:00
Julius Härtl 1b4d502bfd
Adjust acceptance test to check if the correct sidebar view is shown
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-03 14:06:04 +02:00
Daniel Calviño Sánchez 029b33a664 Add acceptance test for creating a user with a custom display name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-31 13:40:47 +02:00
Roeland Jago Douma 71028fde6b
Merge pull request #10322 from weeman1337/feature-9978-improve-disabled-user-login-message
Login: Implements the "user disabled" message like the "wrong password" message
2018-07-24 20:00:20 +02:00
Michael Weimann 801bf81317 Adds disabled user acceptance tests
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-07-24 17:31:03 +02:00
John Molakvoæ (skjnldsv) 0274507cb1
Acceptance and mobile navigation fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-24 11:01:11 +02:00
Daniel Calviño Sánchez 70262fb11a Adjust acceptance tests to the new share link UI
The share link UI no longer uses its own layout below the other shares;
now it is shown as a share row with a menu for the actions (except
enabling it, which is shown in the row itself), just like the other
shares.

The share link is no longer shown, either; now the link is got by
clicking on a "Copy URL" menu item, which copies the link to the
clipboard. As the clipboard is not accessible from the acceptance tests
the URL is now extracted from the attributes of that menu item (although
the menu item is clicked anyway to mimic the user behaviour).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-21 17:31:11 +02:00
John Molakvoæ (skjnldsv) 562e2aa30b
Adjust acceptance tests to sidebar changes in Files app
Before, each section of the Files app ("All files", "Favorites"...) had
its own sidebar element. Now there is a single sidebar element for all
the sections in the Files app.

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-20 23:38:03 +02:00
Julius Härtl 4d5c01e066
Fix accceptance tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-20 16:49:05 +02:00
Michael Weimann 37e0f85ad0 Adds tests for testing removing an empty group
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-07-20 09:51:23 +02:00
Roeland Jago Douma 8ebc3d90a0
Merge pull request #9518 from nextcloud/feature/5986/public_share_controller_middleware
Public share middleware & controller
2018-06-21 10:09:20 +02:00
Daniel Calviño Sánchez 2cfb3832fa
Adjust theming acceptance tests to new header colour transition
Before, the acceptance tests checked the header colour just once, as the
header colour was immediately changed once the new theming colour was
saved. This is no longer the case, as currently a transition is used to
change between the original colour and the new one, so now the
acceptance tests check repeteadly for the expected header colour until
it matches or the timeout expires.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-06-20 19:21:54 +02:00
John Molakvoæ (skjnldsv) e01f004a13
Fixed tests and improved app-navigation-caption
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-20 19:21:54 +02:00
Roeland Jago Douma 5805159487
Fix acceptance test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-20 08:57:13 +02:00
Julius Härtl cdbe39d006
Properly check for the sidebar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-09 12:06:14 +02:00
Julius Härtl de66336f9c
Add basic acceptance tests for apps management
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-09 11:37:41 +02:00
John Molakvoæ (skjnldsv) da583f05fc
Allow 0 quota by provisioning api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-07 11:30:37 +02:00
John Molakvoæ (skjnldsv) 549940ddb9
Fixed root url detection, new tests, default new user group to current
opened group and user removal update fix

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:24 +02:00
John Molakvoæ (skjnldsv) 6b1452bd7b
Bump script and fixed copyright template
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:24 +02:00
John Molakvoæ (skjnldsv) a434077251
Tabs fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:24 +02:00
John Molakvoæ (skjnldsv) 07a592bd27
Users list acceptance tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:23 +02:00
John Molakvoæ (skjnldsv) f3a06259e4
newt acceptance tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:23 +02:00
John Molakvoæ (skjnldsv) e45147d7d6
Fixed router
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:23 +02:00
John Molakvoæ (skjnldsv) a30eacccbf
Fixed new user form detection in acceptance
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:23 +02:00
John Molakvoæ (skjnldsv) f9143f8db4
Fix row detection acceptance test
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-05-16 09:50:23 +02:00
Daniel Calviño Sánchez 4341d8731e Rename helper for PHP built-in web server
For consistency with the helper for the Apache web server the helper for
the PHP built-in web server was renamed too.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-09 21:50:30 +02:00
Daniel Calviño Sánchez aa96dfd173 Add helper to run acceptance tests on an Apache server
The default and only helper to run acceptance tests run them on the PHP
built-in web server. This commit introduces a new helper that can be
used to run them on an Apache web server instead.

This helper is meant to be used by the acceptance tests of apps that
require a multi-threaded web server to run (like Talk, due to its use of
long polling). To use the helper it is only needed to set it in the
Behat configuration for the acceptance tests of the app, as explained in
the "NextcloudTestServerContext" documentation.

It is assumed that the acceptance tests are run using the default setup,
and therefore inside a Docker container based on the image for
acceptance tests from Nextcloud. Due to that the helper is expected to
have root permissions, and thus it starts and stops the Apache web
server directly using "service start/stop apache2". In the same way it
also restores the owner and group for "apps", "config" and "data" to
"www-data", as it is the user that Apache sub-processes are run as.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-09 21:50:30 +02:00
Julius Härtl 5598d30ef1
Fix files acceptance test
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-05 21:10:33 +02:00
Julius Härtl bbeb3402b6
Move styling and menu handling to publicpage.js
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-05 12:21:39 +02:00
John Molakvoæ (skjnldsv) 3d99a9d24e Header acceptance features
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-09 14:33:22 +01:00
Daniel Calviño Sánchez 15c12eb027 Add acceptance tests for creation of subfolders in public shared folders
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-09 03:37:08 +01:00
Daniel Calviño Sánchez 1a2d9a2fdd Extract common "wait for" functions to a helper class
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-09 03:37:08 +01:00
Daniel Calviño Sánchez fcd6cf08e0 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 create a new folder named :folderName in the public shared
folder" instead of "I create a new folder named :folderName") 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-09 03:37:08 +01:00
Daniel Calviño Sánchez 766135cb64 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-09 03:37:08 +01:00
Daniel Calviño Sánchez 10490f2ac3 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-09 03:37:08 +01:00
Daniel Calviño Sánchez 49f2ba16f0 Extract file list locators and steps to its own class
Besides the extraction some minor adjustments (sorting locators for file
action menu entries to reflect the order of the menu entries in the UI,
moving parametrized locators like "createMenuItemFor" 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-09 03:37:08 +01:00
Daniel Calviño Sánchez c1fa0f8b86 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-08 14:54:01 +01:00
Daniel Calviño Sánchez deb2495f89 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-08 14:53:15 +01:00
John Molakvoæ (skjnldsv) 2d4896e2a7
fixup! Acceptance fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-01 12:57:00 +01:00
John Molakvoæ (skjnldsv) 484568e995
Acceptance fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-01 10:45:56 +01:00
Roeland Jago Douma 926419e15c
Merge pull request #7600 from nextcloud/new-user-button-to-sidebar
New user button to sidebar
2018-02-28 12:33:30 +01:00
John Molakvoæ (skjnldsv) 907234fde2 Fix acceptance tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-02-28 11:17:39 +01:00
Julius Härtl fd830b90eb
Fix acceptance test for new menu structure
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-02-27 12:25:53 +01:00
Daniel Calviño Sánchez 81fdbc6554 Take into account the comment message when looking for it
Instead of checking that the list contains one comment it is now checked
that a comment with certain message is visible. This makes the step (and
the locator) more reusable in future tests and also simplifies the code.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-02-15 17:48:07 +01:00