summaryrefslogtreecommitdiffstats
path: root/tests/acceptance
Commit message (Collapse)AuthorAgeFilesLines
* Update images in scripts to run local tests in DockerDaniel Calviño Sánchez2022-03-031-1/+1
| | | | | | | | PHP 7.3 support was dropped for Nextcloud 24. The Docker images are updated to the same images used for integration and acceptance tests in CI. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Profile backendChristopher Ng2021-10-191-2/+2
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Merge pull request #29064 from ↵Louis2021-10-061-1/+7
|\ | | | | | | | | nextcloud/feature/add_cache_to_local_integration_tests_container Add caching for local run of integration and acceptance tests
| * Add cache for local integration test containerLouis Chemineau2021-10-061-1/+7
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Fix app-files acceptance testsLouis Chemineau2021-10-061-2/+2
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Bump @nextcloud/vueJohn Molakvoæ2021-09-162-3/+3
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Handle single action unshareJulius Härtl2021-06-091-4/+16
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Settings: new user row replaced by a modalSimounet2021-04-211-1/+1
| | | | Signed-off-by: Simounet <contact@simounet.net>
* Add automatic handling of "ElementNotInteractable" exceptionsDaniel Calviño Sánchez2021-04-191-1/+24
| | | | | | | | | | | | | | | | | | | | | | | In the WebDriver protocol, when a command fails because it can not interact with the target element, an "element not interactable" error is generated. It can be a transitive issue (for example, due to an animation), so when the error is received the command should be tried again, just like done, for example, with "ElementNotVisible" exceptions. However, the last version of the "instaclick/php-webdriver" library compatible with the Selenium Driver of Mink did not support yet that WebDriver error. And even if Chrome is run using the old protocol an unknown "element not interactable" error can be received anyway in some cases. When an unknown error is received by the "instaclick/php-webdriver" library it is thrown as a generic Exception so, until the library can be updated, the message of generic exceptions is checked and the command is retried if it matched. For the time being "element not interactable" errors are handled like "ElementNotVisible" exceptions; this may need to change once the error is better understood. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update acceptance tests to Selenium 3Daniel Calviño Sánchez2021-04-162-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The acceptance tests used the last Selenium 2 Docker container available, which provides a rather old Firefox version (Firefox 47). Nevertheless, despite some rendering issues, most things still worked as expected due to the JavaScript files being built with support for older browsers. However, now that support for Internet Explorer 11 and older browsers will be dropped things could start to fail, so a newer browser (and thus a newer Selenium version) should be used in the acceptance tests. Selenium has been standardized by the W3C, and the protocol to communicate between the Selenium server and the browser has changed due to that. Firefox >= 48 only supports the new W3C protocol, but the Selenium driver for Mink does not support it yet. The old protocol can still be used in recent Chromium/Chrome versions by explicitly forcing it, so for the time being the acceptance tests will need to be run on Chrome instead (although Firefox provides some interesting features like the fake streams that would be needed to test calls in Talk, so they should be moved again to Firefox once possible). Finally, the default shm size of Docker is 64 MiB. This does not seem enough to run newer Chrome releases and causes the browser to randomly crash during the tests ("unknown error: session deleted because of page crash" is shown in the logs). Due to this "disable-dev-shm-usage" needs to be used so Chrome writes shared memory files into "/tmp" instead of "/dev/shm" (the default shm size of Docker could have been increased instead using "docker run --shm-size...", but that seems to be problematic when the container is run in current Drone releases). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Replace carriage return with WebDriver "ENTER" constantDaniel Calviño Sánchez2021-04-162-2/+4
| | | | | | | | | | When the value is set in some input fields a carriage return was sent to simulate pressing the enter key and thus confirming the input. However, different browsers use different keys (Firefox uses "\r", but Chrome uses "\n"), so the carriage return was replaced with the WebDriver "ENTER" constant which is common to both browsers. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Do not send "enter" key when not neededDaniel Calviño Sánchez2021-04-163-3/+3
| | | | | | | | | Sending the "enter" key is not needed in those input fields that auto save while the user is typing or when the focus is lost (which since version 1.4.0 the Selenium driver for Mink is automatically done after setting the value). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update Mink from 1.7.1 to 1.8.1 in acceptance testsDaniel Calviño Sánchez2021-03-303-17/+24
| | | | | | | | Since version 1.8.0 of Mink "Mink::getSession()" no longer starts the session automatically (see https://github.com/minkphp/Mink/pull/705), so it now needs to be explicitly started. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update Selenium driver for Mink from 1.3.1 to 1.4.0 in acceptance testsDaniel Calviño Sánchez2021-03-304-20/+30
| | | | | | | | | | | | | | | | | | | | | | | | Since version 1.4.0 the Selenium driver for Mink uses again the element on which the value was set (see https://github.com/minkphp/MinkSelenium2Driver/pull/286). When creating a new folder or renaming one sending a new line ("\r") caused the element on which the value was set to be removed, so the element was no longer attached to the DOM when the driver tried to use it again, and thus a "StaleElementReference" exception was thrown. Due to this now it is needed to explicitly click the confirm button when creating a new folder. In the case of the renaming, on the other hand, nothing else besides not sending the new line is needed, as the Selenium driver now unfocuses the element (that is why it uses again the element after setting the value) which triggers the renaming. Besides that, the Selenium driver for Mink uses a library to simulate certain events, bitovi/syn. In version 1.4.0 that library was updated to version 0.0.3, which seems to somehow break pressing the "escape" key. Due to this now the sharing menu has to be closed by pressing "enter" on the share menu button instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update Behat from 3.7.0 to 3.8.1 in acceptance testsDaniel Calviño Sánchez2021-03-302-18/+18
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update PHPUnit from 4.X to 6.X in acceptance testsDaniel Calviño Sánchez2021-03-3020-268/+682
| | | | | | | | The PHPUnit update also required an update of "symfony/yaml", so besides the changes needed for PHPUnit the "behat.yml" file also had to be adjusted. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Change label also in the acceptance testsJoas Schilling2021-03-101-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #25990 from ↵kesselb2021-03-081-7/+3
|\ | | | | | | | | nextcloud/do-not-try-to-add-an-existing-user-again-in-acceptance-tests Do not try to add an existing user again in acceptance tests
| * Remove unneeded steps to add already existing userDaniel Calviño Sánchez2021-03-071-5/+0
| | | | | | | | | | | | | | User "user1" is added when installing and configuring the server, so it is already added in all tests. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix acceptance test for searching just added users in contacts menuDaniel Calviño Sánchez2021-03-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | User "user1" is added when installing and configuring the server, so it is already added in all tests. As the test verifies that just added users can be searched in the contacts menu a new user should be actually added. The test did not fail because it assumed that "user1" did not exist and just checked that it existed after "adding" it, but not whether adding it failed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Find directly the label instead of falling back to itDaniel Calviño Sánchez2021-03-061-8/+1
| | | | | | | | | | | | | | | | The input element is always hidden, so the check always ended falling back to the label. Moreover, the label is the element that the user interacts with, so it must be the one used. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Assert also element visibility instead of just finding itDaniel Calviño Sánchez2021-03-061-4/+12
| | | | | | | | | | | | | | | | Although if the element could not be found an exception would be thrown and the test aborted if an element is in the DOM but hidden it would be found and the test would pass. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Add explicit locator for "Enable all" bundle buttonDaniel Calviño Sánchez2021-03-061-5/+7
| | | | | | | | | | | | | | | | | | | | | | Instead of looking for the bundle button and then checking its value now the expected value is included in the locator and the button is checked similarly to other elements. No "Disable all" locator was added as it was not currently needed anywhere. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Find elements through the actor rather than the driverDaniel Calviño Sánchez2021-03-061-4/+30
| | | | | | | | | | | | | | | | | | | | "Actor::find" is a more robust way to look for elements, as it handles some exceptions that may be thrown. Therefore, even if the elements are not actually used and it is only checked whether they exist or not using the actor is the preferred way when possible (and it also makes it consistent with the rest of the acceptance tests). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Add locator for apps listDaniel Calviño Sánchez2021-03-061-4/+16
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix identationDaniel Calviño Sánchez2021-03-061-14/+14
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix delete user acceptance testDaniel Calviño Sánchez2021-03-062-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding some missing asserts showed that the "delete user" acceptance test was silently failing, as the deletion was not being confirmed in the dialog and thus the user was not being deleted. The dialog button contains a single quote ("user0's"), so the XPath expression had to be adjusted (it seems that it is not possible to escape a single quote in a string enclosed in single quotes in XPath 1.0). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Verify WaitFor::element... results with an assertionDaniel Calviño Sánchez2021-03-055-11/+74
| | | | | | | | | | | | | | | | WaitFor::element... calls only perform the waiting and return whether the condition succeeded or not, but that result needs to be explicitly checked to prevent further steps from being executed if the wait failed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Add missing waits when finding elements in the acceptance testsDaniel Calviño Sánchez2021-03-053-7/+7
|/ | | | | | | | As no timeout was specified the elements were tried to be found just once. This caused the steps to fail if the elements did not appear yet in the page when they were tried to be found. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add "composer.lock" for acceptance tests to gitDaniel Calviño Sánchez2021-01-172-3/+2774
| | | | | | | | | | As "composer.lock" was not versioned the dependencies had to be resolved everytime that the acceptance tests run, which took some precious time. Besides that the dependency versions were also tightened for better control. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add acceptance tests for reshares by link when resharing is disabledDaniel Calviño Sánchez2020-11-112-0/+111
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add acceptance tests for reshares when resharing is disabledDaniel Calviño Sánchez2020-11-113-0/+194
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #23614 from ↵Morris Jobke2020-10-221-42/+43
|\ | | | | | | | | nextcloud/tests/22305/unreliable-app-files-sharing-338 Disable unreliable app-files-sharing.feature:108
| * Disable unreliable app-files-sharing.feature:108Morris Jobke2020-10-211-42/+43
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Disable unreliable app-files.feature:108Morris Jobke2020-10-211-6/+7
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Set status is also there nowJoas Schilling2020-10-021-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adjust acceptance tests to changes in @nextcloud/vue 2.6.3Daniel Calviño Sánchez2020-09-031-75/+136
| | | | | | | | | | | | | | | | The menu button and the menu of a share are no longer direct childs of the actions of the share row. The menu button is now a child of a ".trigger" element, while the menu is a direct child of the body and has an id defined in the "aria-describedby" attribute of the ".trigger" element. In XPath 1.0 it does not seem possible to "backreference" a value or create variables, so when the share menu or one of its item is needed now the ".trigger" element is first found and then its XPath expression is used to compose its "aria-describedby" attribute in the XPath expression for the menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix clicks on actions menu of non opaque file rows in acceptance testsDaniel Calviño Sánchez2020-08-291-7/+37
| | | | | | | | | | | | | | | | When a row is added to the file list the opacity of the file row is animated from transparent to fully opaque. As the file actions menu is a descendant of the row but overflows it when the row is not fully opaque clicks on the menu entries "fall-through" and are received instead by the rows behind. The opacity animation is a CSS animation, and it is not possible to know if a row is appearing or not except from its opacity (the row will have the "appear" CSS class even after the animation ended). Therefore it should be waited until the row of the file is fully opaque before using the menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Dashboard app is disabled and there is no need to redirect to files appMorris Jobke2020-08-051-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Redirect to files app after login in acceptance testsJulius Härtl2020-08-052-1/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #21940 from ↵Morris Jobke2020-07-242-14/+14
|\ | | | | | | | | nextcloud/fix/14541/fix-fragile-acceptance-tests-part1 Revert "Disable fragile tests for now" partially
| * Revert "Disable fragile tests for now"Morris Jobke2020-07-212-14/+14
| | | | | | | | | | | | This reverts commit 40e04c83914e960b5aff739900d887f0e7a44d63. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Hide share link menu before copying the share link in acceptance testsDaniel Calviño Sánchez2020-07-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | The (old) Firefox version used in the acceptance tests does not properly render the share link menu. As the menu is taller than it should sometimes it covers the copy link button, so it is not possible to click it without hiding the share link menu. Moreover, in those cases the share menu button is also covered by the share menu, so the menu needs to be closed by pressing the "Esc" key. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix breaking changes of nc/vue updateGeorg Ehrke2020-07-225-10/+10
|/ | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Merge pull request #21379 from ↵Roeland Jago Douma2020-06-242-9/+216
|\ | | | | | | | | nextcloud/fix-share-permission-checkboxes-enabled-when-permissions-can-not-be-set Fix share permission checkboxes enabled when permissions can not be set
| * Add acceptance test for disabling create permission after sharingDaniel Calviño Sánchez2020-06-111-0/+43
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add acceptance test for sharing a folder without create permissionDaniel Calviño Sánchez2020-06-112-0/+75
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add acceptance test for sharing a file without edit permissionDaniel Calviño Sánchez2020-06-112-0/+75
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Generalize functions to get locators for share permission checkboxesDaniel Calviño Sánchez2020-06-111-9/+23
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | acceptence tests shall specify which branch to pick when cloning appsArthur Schiwon2020-06-191-1/+2
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>