Commit Graph

249 Commits

Author SHA1 Message Date
kesselb 2ddf3c9df0
Merge pull request #25990 from 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
2021-03-08 10:18:46 +01:00
Daniel Calviño Sánchez c51c3c771f Remove unneeded steps to add already existing user
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>
2021-03-07 18:34:10 +01:00
Daniel Calviño Sánchez 0e6401933b Fix acceptance test for searching just added users in contacts menu
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>
2021-03-07 18:27:45 +01:00
Daniel Calviño Sánchez ee1f8104a0 Find directly the label instead of falling back to it
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>
2021-03-06 01:34:43 +01:00
Daniel Calviño Sánchez 7b6946d2d2 Assert also element visibility instead of just finding it
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>
2021-03-06 01:34:43 +01:00
Daniel Calviño Sánchez 78faf0105d Add explicit locator for "Enable all" bundle button
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>
2021-03-06 01:34:43 +01:00
Daniel Calviño Sánchez f87473e410 Find elements through the actor rather than the driver
"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>
2021-03-06 01:34:43 +01:00
Daniel Calviño Sánchez 6d145ea54a Add locator for apps list
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-06 01:34:42 +01:00
Daniel Calviño Sánchez 4c23d24277 Fix identation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-06 01:34:42 +01:00
Daniel Calviño Sánchez bc084070c8 Fix delete user acceptance test
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>
2021-03-06 01:29:54 +01:00
Daniel Calviño Sánchez d5586ec437 Verify WaitFor::element... results with an assertion
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>
2021-03-05 22:06:05 +01:00
Daniel Calviño Sánchez caa2246568 Add missing waits when finding elements in the acceptance tests
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>
2021-03-05 22:06:05 +01:00
Daniel Calviño Sánchez d6a1d8d3a1 Add "composer.lock" for acceptance tests to git
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>
2021-01-17 16:44:32 +01:00
Daniel Calviño Sánchez b6dec0be99 Add acceptance tests for reshares by link when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-11 01:35:27 +01:00
Daniel Calviño Sánchez 22d949d9d9 Add acceptance tests for reshares when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-11 01:35:27 +01:00
Morris Jobke a7470576cf
Merge pull request #23614 from nextcloud/tests/22305/unreliable-app-files-sharing-338
Disable unreliable app-files-sharing.feature:108
2020-10-22 12:19:39 +02:00
Morris Jobke dff9853d36
Disable unreliable app-files-sharing.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-21 22:07:13 +02:00
Morris Jobke 8128913dff
Disable unreliable app-files.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-21 21:53:29 +02:00
Joas Schilling 7255666557
Set status is also there now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-02 09:12:03 +02:00
Daniel Calviño Sánchez 96821945fb
Adjust acceptance tests to changes in @nextcloud/vue 2.6.3
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>
2020-09-03 09:09:26 +02:00
Daniel Calviño Sánchez 034b7bd4a9 Fix clicks on actions menu of non opaque file rows in acceptance tests
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>
2020-08-29 03:32:14 +02:00
Morris Jobke 5a06e38564
Dashboard app is disabled and there is no need to redirect to files app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-05 22:49:47 +02:00
Julius Härtl 4679926511
Redirect to files app after login in acceptance tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-05 17:01:29 +02:00
Morris Jobke 34c027e443
Merge pull request #21940 from nextcloud/fix/14541/fix-fragile-acceptance-tests-part1
Revert "Disable fragile tests for now" partially
2020-07-24 01:04:13 +02:00
Daniel Calviño Sánchez 9303390b66
Hide share link menu before copying the share link in acceptance tests
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>
2020-07-22 15:59:35 +02:00
Georg Ehrke f217b11443
Fix breaking changes of nc/vue update
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-22 15:55:59 +02:00
Morris Jobke 5cd5d3c55b
Revert "Disable fragile tests for now"
This reverts commit 40e04c8391.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-21 15:58:55 +02:00
Roeland Jago Douma 7d4682da40
Merge pull request #21379 from nextcloud/fix-share-permission-checkboxes-enabled-when-permissions-can-not-be-set
Fix share permission checkboxes enabled when permissions can not be set
2020-06-24 21:20:17 +02:00
Arthur Schiwon de61c7d302
acceptence tests shall specify which branch to pick when cloning apps
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-06-19 21:08:39 +02:00
Daniel Calviño Sánchez 2c6d5068ad Add acceptance test for disabling create permission after sharing
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:18:21 +02:00
Daniel Calviño Sánchez 33222d67ea Add acceptance test for sharing a folder without create permission
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:17:33 +02:00
Daniel Calviño Sánchez 573bf4d667 Add acceptance test for sharing a file without edit permission
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:15:26 +02:00
Daniel Calviño Sánchez cafa68493a Generalize functions to get locators for share permission checkboxes
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-06-11 23:12:20 +02:00
John Molakvoæ 97de425a17
Merge pull request #20419 from nextcloud/dependabot/npm_and_yarn/various
Bump p-limit from 2.2.2 to 2.3.0, @nextcloud/auth from 1.2.2 to 1.2.3, @babel/preset-env from 7.8.7 to 7.9.5, @nextcloud/event-bus from 1.1.3 to 1.1.4, @nextcloud/password-confirmation from 1.0.0 to 1.0.1, @nextcloud/l10n from 1.2.2 to 1.2.3, @nextcloud/initial-state from 1.1.1 to 1.1.2, core-js from 3.6.4 to 3.6.5 …
2020-04-11 08:18:14 +02:00
John Molakvoæ (skjnldsv) 0f135c7bd6
Bump acceptance tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-04-10 17:07:14 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst a8a06a82d2
Remove trailing whitespaces from comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:09:23 +02:00
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Azul 62f7e6ba81 tests: fix failing header acceptance test
The username is listed in a div with class `fullname` now.

Signed-off-by: Azul <azul@riseup.net>
2020-04-07 14:57:20 +02:00
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