summaryrefslogtreecommitdiffstats
path: root/tests/acceptance
Commit message (Collapse)AuthorAgeFilesLines
* Adjust acceptance test to check if the correct sidebar view is shownJulius Härtl2018-08-031-3/+11
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add acceptance test for creating a user with a custom display nameDaniel Calviño Sánchez2018-07-312-0/+62
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #10322 from ↵Roeland Jago Douma2018-07-243-0/+24
|\ | | | | | | | | weeman1337/feature-9978-improve-disabled-user-login-message Login: Implements the "user disabled" message like the "wrong password" message
| * Adds disabled user acceptance testsMichael Weimann2018-07-243-0/+24
| | | | | | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* | Acceptance and mobile navigation fixesJohn Molakvoæ (skjnldsv)2018-07-241-2/+12
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Adjust acceptance tests to the new share link UIDaniel Calviño Sánchez2018-07-211-24/+66
|/ | | | | | | | | | | | | | | 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>
* Adjust acceptance tests to sidebar changes in Files appJohn Molakvoæ (skjnldsv)2018-07-203-89/+73
| | | | | | | | 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>
* Fix accceptance testsJulius Härtl2018-07-201-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Adds tests for testing removing an empty groupMichael Weimann2018-07-203-1/+31
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Fix variable not replaced in "behat.yml" when default value was usedDaniel Calviño Sánchez2018-06-281-15/+13
| | | | | | | | As "selenium.server" is a simulated variable it is not recognized by Mink, so it must be always replaced by its value in "behat.yml" before the file is parsed by Behat. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix documentationDaniel Calviño Sánchez2018-06-221-2/+2
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Set "wd_host" directly in "behat.yml" instead of through "BEHAT_PARAMS"Daniel Calviño Sánchez2018-06-222-29/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | The "wd_host" parameter of Selenium2 sessions specify the URL used by the Selenium driver to connect with the Selenium server. Thus, when the Selenium server is at a different host or port than the default one (for example, when run on Drone) the "wd_host" parameter must be set for each of the Selenium2 sessions defined in "behat.yml". The "BEHAT_PARAMS" environment variable, which extends the "behat.yml" configuration file, was used for that. However, this required adding to the "BEHAT_PARAMS" in "run-local.sh" each new session added to "behat.yml", including those added in the acceptance tests of apps. To address that limitation, this commit introduces a simulated variable, "selenium.server"; just before the acceptance tests are run the "selenium.server" variable in the "wd_host" parameter is replaced in the "behat.yml" file used by the acceptance tests. Note that the file that is modified is the one inside the Docker container used to run the acceptance tests, so the original file is not touched. Note that a simulated variable is needed because Behat does not support overridding nor setting configuration parameters with environment variables. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #9518 from ↵Roeland Jago Douma2018-06-211-2/+2
|\ | | | | | | | | nextcloud/feature/5986/public_share_controller_middleware Public share middleware & controller
| * Fix acceptance testRoeland Jago Douma2018-06-201-2/+2
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Adjust theming acceptance tests to new header colour transitionDaniel Calviño Sánchez2018-06-202-10/+20
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Fixed tests and improved app-navigation-captionJohn Molakvoæ (skjnldsv)2018-06-201-1/+1
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Properly check for the sidebarJulius Härtl2018-06-092-3/+26
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add basic acceptance tests for apps managementJulius Härtl2018-06-095-1/+317
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Allow 0 quota by provisioning apiJohn Molakvoæ (skjnldsv)2018-06-071-1/+10
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use "paths.base" parameter for the path to the custom Firefox profileDaniel Calviño Sánchez2018-05-291-1/+1
| | | | | | | | Although in the case of the acceptance tests for the server it is not strictly needed it was modified for consistency with the configuration used for the acceptance tests in apps. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add workaround for parameter not available in Mink ExtensionDaniel Calviño Sánchez2018-05-291-0/+12
| | | | | | | | | | | | | | | | | | | | Due to a bug in the Mink Extension for Behat it is not possible to use the "paths.base" parameter in the path to the custom Firefox profile. "paths.base" is a special parameter in the Behat configuration that refers to the directory in which "behat.yml" is stored. This comes in very handy to set the path to custom Firefox profiles in the acceptance tests for apps, as even if the "behat.yml" file belongs to an app its paths are relative to the directory in which the tests are run, that is, the "tests/acceptance" directory of the server. Until the bug is fixed, just before the acceptance tests are run the "paths.base" parameter in the path to the custom Firefox profile is replaced by its value in the "behat.yml" file used by the acceptance tests. Note that the file that is modified is the one inside the Docker container used to run the acceptance tests, so the original file is not touched. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Extract path to configuration dir to its own variableDaniel Calviño Sánchez2018-05-291-3/+5
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #8824 from nextcloud/settings-vueMorris Jobke2018-05-238-24/+522
|\ | | | | Vue migration: settings
| * Fixed root url detection, new tests, default new user group to currentJohn Molakvoæ (skjnldsv)2018-05-162-33/+107
| | | | | | | | | | | | opened group and user removal update fix Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Bump script and fixed copyright templateJohn Molakvoæ (skjnldsv)2018-05-164-118/+122
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Tabs fixJohn Molakvoæ (skjnldsv)2018-05-162-72/+76
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Users list acceptance testsJohn Molakvoæ (skjnldsv)2018-05-167-44/+394
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * newt acceptance testsJohn Molakvoæ (skjnldsv)2018-05-162-0/+67
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Fixed routerJohn Molakvoæ (skjnldsv)2018-05-161-1/+0
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Fixed new user form detection in acceptanceJohn Molakvoæ (skjnldsv)2018-05-161-1/+1
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Fix row detection acceptance testJohn Molakvoæ (skjnldsv)2018-05-161-2/+2
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Add Firefox profile with support for CSS grid to acceptance testsDaniel Calviño Sánchez2018-05-182-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | The acceptance tests are currently run on Firefox 47; in that version the CSS grid support was not enabled by default, but it could be enabled through a setting in the Firefox profile. By default Selenium uses a clean Firefox profile when a new session is started, but it also allows the customization of the profile through a zipped "user.js" file. The contents of that file have to be provided in the "firefox_profile" capability when the Firefox session is created. In the Mink extension for Behat several Mink sessions can be defined in the "behat.yml" file. Each Mink session uses a different browser session in Selenium, and each of those browser sessions is initialized with the capabilities provided in the "behat.yml" file. From the point of view of the acceptance tests each Mink session is an actor, so different actors can use different browsers with different capabilities. Due to all this a new actor was introduced, "Rubeus", who uses a Firefox browser that has CSS grid support; this actor is meant to be used only in those acceptance tests that require proper support for CSS grids. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Rename helper for PHP built-in web serverDaniel Calviño Sánchez2018-04-092-14/+14
| | | | | | | 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>
* Add helper to run acceptance tests on an Apache serverDaniel Calviño Sánchez2018-04-091-0/+130
| | | | | | | | | | | | | | | | | | | | | | 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>
* Add support for setting the domain also when a specific helper is usedDaniel Calviño Sánchez2018-04-091-1/+5
| | | | | | | | | | | | | | | | | Before, the domain was automatically added assuming that the NextcloudTestServerContext had no parameters defined in the Behat configuration. However, in order to use a helper for Apache it would need to be specified in the configuration with something like: - NextcloudTestServerContext: nextcloudTestServerHelper: NextcloudTestServerLocalApacheHelper The substitution now works both when a helper is specified and when it is not; note, however, that providing custom parameters to the helper is not supported, although they are not needed anyway so it is not really a problem. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Install and configure Nextcloud server as www-dataDaniel Calviño Sánchez2018-04-091-1/+8
| | | | | | | | | | | | Apache sub-processes are run as the www-data user, and they need to be able to write to the "apps", "config" and "data" directories, so they have to belong to that user, and therefore the Nextcloud server has to be installed and configured too as the www-data user. The PHP built-in web server will still be run as the root user, but in that case the owner of those directories makes no difference, so this is compatible with both cases. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Use Docker image for acceptance testsDaniel Calviño Sánchez2018-04-091-1/+5
| | | | | | | | | | | | The Docker image for acceptance tests provides support for both the PHP built-in web server and the Apache web server; the acceptance tests for the server are run on the PHP built-in web server, but the acceptance tests for some apps will have to be run on the Apache web server (for example, Talk, as it uses long polling), so a Docker image to support both cases has to be used in "run.sh". ".drone.yml" was just updated for consistency, although it was not really needed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #9114 from ↵Morris Jobke2018-04-094-11/+57
|\ | | | | | | | | nextcloud/make-possible-to-provide-acceptance-tests-for-apps Make possible to provide acceptance tests for apps
| * Make possible to set the acceptance tests directory to useDaniel Calviño Sánchez2018-04-062-7/+55
| | | | | | | | | | | | | | | | | | | | | | | | When the acceptance tests were run they were always loaded from the "tests/acceptance" directory of the Nextcloud server. Now it is possible to set the directory used to look for the Behat configuration and the Nextcloud installation script, which makes possible to run acceptance tests for the apps too instead of only for the server (although if no directory is explicitly given the tests for the server are the ones run). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add context classes to Composer autoloadDaniel Calviño Sánchez2018-04-062-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to autoload the server context classes the "bootstrap" directory was explicitly listed in Behat autoload configuration. This is fine in the configuration of acceptance tests for the server, but it would force the configuration of acceptance tests for the apps to explicitly include the path for the server context classes to be able to use them (for example, for the login step). Besides with its own configuration Behat also supports autoloading classes using Composer, so now context classes are autoloaded using Composer instead; thanks to this the server context classes are autoloaded also in the acceptance tests for apps without any explicit configuration in them. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix typoDaniel Calviño Sánchez2018-03-271-1/+1
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix files acceptance testJulius Härtl2018-04-051-1/+1
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Move styling and menu handling to publicpage.jsJulius Härtl2018-04-051-1/+1
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Header acceptance featuresJohn Molakvoæ (skjnldsv)2018-03-096-10/+239
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add acceptance tests for creation of subfolders in public shared foldersDaniel Calviño Sánchez2018-03-093-0/+121
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Extract common "wait for" functions to a helper classDaniel Calviño Sánchez2018-03-093-46/+86
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Generalize file list steps so a specific ancestor can be usedDaniel Calviño Sánchez2018-03-094-3/+115
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Generalize file list locators so a specific ancestor can be usedDaniel Calviño Sánchez2018-03-092-54/+66
| | | | | | | | | | | | | | | | | | | | 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>
* Store the name of the actor in the Actor objectDaniel Calviño Sánchez2018-03-092-3/+19
| | | | | | 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>
* Extract file list locators and steps to its own classDaniel Calviño Sánchez2018-03-093-250/+288
| | | | | | | | | | 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>