summaryrefslogtreecommitdiffstats
path: root/tests/acceptance
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into autocomplete-guiArthur Schiwon2017-11-013-8/+58
|\
| * bump acceptance test suite to use php 7.1 imageArthur Schiwon2017-10-311-1/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * Solve acceptance test failure due to clicks on covered elementsDaniel Calviño Sánchez2017-10-192-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firefox and Chrome drivers for Selenium refuse to click on an element if the point to be clicked is covered by a different element, throwing an UnknownError exception with message "Element is not clickable at point ({x}, {y}). Other element would receive the click: {element}". Although in general that would be a legit error (as the user would not be able to click on the element) due to a bad layout, sometimes this can be just a temporal issue caused by an animation, in which case there would be no problem once the animation finished and the elements are all in their final location. Unfortunately, automatically handling those situations in which the problem is caused by an animation by just retrying a few times if the element to be clicked is covered before giving up would probably cause confusion instead of easing test writing. The reason is that if the center of the element is covered by another one the Firefox driver for Selenium tries to click on the corners of the element instead. The problem is that the coordinates used for the click are integer values, but Firefox has sub-pixel accuracy, so sometimes (depending on which corner is not covered and whether the left, top, width or height properties of the element to be clicked have a decimal component or not) the clicks silently land on a different HTML element (and that is with squared borders; with round borders they always land on a different HTML element. That was partially addressed for Selenium 3.0 by clicking first on the edges, but it would still fail if the middle point of the edges is covered but not the corners). It is not possible to fix or even detect all that from the tests (except maybe with some extreme hacks involving accessing private PHP members from Mink and bypassing or replacing the standard JavaScript executed by the Firefox driver with a custom implementation...), so it is not possible to ensure that clicks during an animation will land on the right element (in fact it is not possible even on static elements, although except when the layout is wrong there should be no problem); sometimes retrying a click when the element is covered would solve the problem, sometimes it would cause a different element to be clicked (and sometimes there would be even no retry, as the first click would have silently landed on a different element than the expected one). Therefore, a different approach must be used. Instead of trying to automatically handle clicks during animations the tests must be written being aware of the problem and thus waiting somehow for the animations that can cause a problem to end before performing the clicks. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Replace inline favorite action with just a favorite iconDaniel Calviño Sánchez2017-10-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparatory step for a following commit in which the position of the favorite icon and the checkbox will be swapped; in that new design the favorite icon is no longer expected to be an action but just a simple mark on whether the file is favorited or not (the action is expected to be triggered then only from the file actions menu). The favorite icon is now fully shown or completely hidden depending on whether the file is favorited or not. As the icon is just informative but no longer an action now it does not change when hovered or focus. In the same way, the alternative text when the file is not favorited now it is not "Favorite" (an action) but "Not favorited" instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Update acceptance tests to favorite files through the file actions menuDaniel Calviño Sánchez2017-10-191-2/+20
| | | | | | | | | | | | | | | | | | Currently a file can be favorited either through the inline action or through the file actions menu. However, the inline action will be removed in a following commit and then it will be possible to do it only through the file actions menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | add acceptance testsArthur Schiwon2017-10-283-0/+91
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Add acceptance tests for setting the color in the Theming appDaniel Calviño Sánchez2017-08-103-0/+178
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add getter for the timeout multiplierDaniel Calviño Sánchez2017-08-101-0/+9
| | | | | | | | | 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>
* Add option to acceptance test runner to set the Selenium serverDaniel Calviño Sánchez2017-07-201-1/+40
| | | | | | | | 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>
* Add option to acceptance test runner to set the Nextcloud server domainDaniel Calviño Sánchez2017-07-202-1/+45
| | | | | | | | | | | | 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>
* Make possible to configure the domain for the Nextcloud test serverDaniel Calviño Sánchez2017-07-201-6/+16
| | | | | | | | | | | | | 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>
* Add acceptance tests for unselecting items in dropdown for tagsDaniel Calviño Sánchez2017-07-104-0/+318
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Extract app navigation elements to its own contextDaniel Calviño Sánchez2017-07-083-39/+70
| | | | | | | | 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>
* Fix typoDaniel Calviño Sánchez2017-07-081-2/+2
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add acceptance tests for sorting of favorite filesDaniel Calviño Sánchez2017-07-052-0/+105
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* try to lower the timeout in an acceptance testArthur Schiwon2017-06-261-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix typos and unnecessary white spacesArthur Schiwon2017-06-262-5/+4
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix and extend acceptance testsArthur Schiwon2017-06-233-6/+55
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Extract duplicated code to a methodDaniel Calviño Sánchez2017-06-091-28/+15
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add acceptance tests for showing the input field for tagsDaniel Calviño Sánchez2017-06-092-0/+123
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update acceptance tests for issue #4921Daniel Calviño Sánchez2017-05-211-1/+10
| | | | | | | | | 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>
* Add automatic handling of common command failures of Mink elementsDaniel Calviño Sánchez2017-05-063-2/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Extract element finding to a command objectDaniel Calviño Sánchez2017-05-062-78/+178
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Make internal find methods staticDaniel Calviño Sánchez2017-05-061-8/+10
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add missing type hintsDaniel Calviño Sánchez2017-05-061-3/+3
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #4682 from ↵Morris Jobke2017-05-044-11/+96
|\ | | | | | | | | 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
| * Add option to acceptance test runners to set a custom timeout multiplierDaniel Calviño Sánchez2017-05-032-1/+48
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Try again to start browser sessions when they failDaniel Calviño Sánchez2017-05-031-1/+27
| | | | | | | | | | | | | | | | | | 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>
| * Generalize attribute nameDaniel Calviño Sánchez2017-05-031-8/+8
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix exponential increase of timeout when finding ancestor elementsDaniel Calviño Sánchez2017-05-031-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Replace "named" Mink selectors with "named_exact" Mink selectorsDaniel Calviño Sánchez2017-05-021-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "named" Mink selector first tries to find an exact match for its locator and then, if not found, tries to find a partial match. Besides other harder to track problems (see comment in the commit in which the "content" locator was removed), this could cause, for example, finding an action link titled "Favorited" when looking for the action link titled "Favorite" (that is, one that conveys the opposite state to the one found). Although currently all the acceptance tests are compatible with both the "named" and the "named_exact" Mink selectors the predefined locators are modified to use the "named_exact" Mink selector to make them more future-proof; the "named" Mink selector can still be used if needed through the "customSelector" method in the builder object. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Remove "content" locator from acceptance testsDaniel Calviño Sánchez2017-05-026-16/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "content" locator uses the "named" Mink selector and the "content" Mink locator to find the element. The "named" Mink first tries to find the elements whose content match exactly the given content but, if none is found, then it tries to find elements that just contain the given content. This behaviour can lead to hard to track issues. Finding the exact match and, if not found, finding the partial match is done in quick succession. In most cases, when looking for an exact match the element is already there, it is returned, and everything works as expected. Or it may not be there, but then it is not there either when finding the partial match, so no element is returned, and everything works as expected (that is, the actor tries to find again the element after some time). However, it can also happen that when looking for an exact match there is no element yet, but it appears after trying to find the exact match but before trying to find the partial match. In that situation the desired element would be returned along with its ancestors. However, as only the first found element is taken into account and the ancestors would appear first the find action would be successful, but the returned element would not be the expected one. This is highly unlikely, yet possible, and can cause sporadic failures in acceptance tests that, apparently, work as expected. Using a "named_exact" Mink selector instead of the "named" Mink selector does not provide the desired behaviour in most cases either. As it finds any element whose content matches exactly the given content, looking for "Hello world" in "<div><p><a>Hello world</a></p></div>" would match the "div", "p" and "a" elements; in that situation the "div" element would be the one returned, when typically the "a" element would be the expected one. As it is error prone and easily replaceable by more robust locators the "content" locator was removed from the predefined ones (although it can still be used if needed through the "customSelector" method in the builder object). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add acceptance tests for closing details view in Files appDaniel Calviño Sánchez2017-04-252-0/+213
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #4462 from danxuliu/fix-sharing-password-protected-linkRoeland Jago Douma2017-04-256-3/+309
|\ | | | | Fix sharing a password protected link
| * Add acceptance tests for sharing password protected linksDaniel Calviño Sánchez2017-04-244-0/+280
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add system to share data between acceptance test stepsDaniel Calviño Sánchez2017-04-242-3/+29
| | | | | | | | | | | | | | | | The data storage (the "notebook") is shared between all the actors, so the data can be stored and retrieved between different steps by any actor in the same scenario. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix minor code style issues (also known as nitpicking)Daniel Calviño Sánchez2017-04-221-27/+32
|/ | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Run acceptance tests on macOSMorris Jobke2017-04-211-4/+30
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Make test passwords valid for the password_policy appDaniel Calviño Sánchez2017-04-213-7/+7
| | | | | | | | As requested by Morris Jobke, the passwords in the acceptance tests were modified to make them valid both for a clean Nextcloud server and one with the password_policy app enabled. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Move acceptance tests from build/acceptance to tests/acceptanceDaniel Calviño Sánchez2017-04-2123-0/+2108
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Drop JS based acceptance tests - we have our behat based integration tests ↵Thomas Müller2016-04-0630-2344/+0
| | | | which are activly maintained
* correct delete-icon to icon-delete, fix #11128Jan-Christoph Borchardt2014-09-221-1/+1
|
* Added acceptance tests for enabling appsVincent Petry2014-09-034-9/+304
| | | | | | | | | | | | This tests whether a user can see navigation entries after enabling apps. This includes the app's group restriction. This currently expects that a group "group1" exists until we have code to auto-generate groups. This commit also provides a utility function Page.multiselectSetSelection() to make it possible to select entries inside a multiselect.
* Fixed readme for acceptance testsVincent Petry2014-09-011-4/+4
|
* further documentationFelix Böhm2014-08-291-3/+44
|
* fix login suiteFelix Böhm2014-08-292-7/+11
|
* bump version of protractor in package.jsonFelix Böhm2014-08-291-1/+1
|
* Update readme.mdfelixboehm2014-08-291-1/+5
|
* fix typoMorris Jobke2014-08-291-2/+2
|
* gitignore for node modulesFelix Böhm2014-08-291-0/+1
|