Commit Graph

248 Commits (stable20)

Author SHA1 Message Date
Julius Härtl 5c8ddb6ee0
Handle single action unshare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Daniel Calviño Sánchez ace7b9dfe1 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>
3 years ago
Daniel Calviño Sánchez f92a216dcf 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>
3 years ago
Daniel Calviño Sánchez 30c91a7303 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>
3 years ago
Daniel Calviño Sánchez 00b38db77f 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>
3 years ago
Daniel Calviño Sánchez d293751ba7 Add locator for apps list
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Daniel Calviño Sánchez 5859458c52 Fix identation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Daniel Calviño Sánchez d548d212a2 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>
3 years ago
Daniel Calviño Sánchez dd1a554c79 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>
3 years ago
Daniel Calviño Sánchez 8077dbf097 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>
3 years ago
Vincent Petry 8abd227498
Fix CI branch for notifications app
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Daniel Calviño Sánchez 26a6e46eb3 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>
3 years ago
Daniel Calviño Sánchez f58174fdd8 Add acceptance tests for reshares by link when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez 7d7169fdbe Add acceptance tests for reshares when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Morris Jobke 820881168d
Merge pull request #23621 from nextcloud/backport/23613/stable20
[stable20] Disable unreliable app-files.feature:108
4 years ago
Morris Jobke eba5eb8876 Disable unreliable app-files-sharing.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke 78d233276f Disable unreliable app-files.feature:108
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Joas Schilling ac3a32f305 Set status is also there now
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
Julius Härtl 4679926511
Redirect to files app after login in acceptance tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
4 years ago
Morris Jobke 34c027e443
Merge pull request #21940 from nextcloud/fix/14541/fix-fragile-acceptance-tests-part1
Revert "Disable fragile tests for now" partially
4 years ago
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>
4 years ago
Georg Ehrke f217b11443
Fix breaking changes of nc/vue update
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
4 years ago
Morris Jobke 5cd5d3c55b
Revert "Disable fragile tests for now"
This reverts commit 40e04c8391.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
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
4 years ago
Arthur Schiwon de61c7d302
acceptence tests shall specify which branch to pick when cloning apps
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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 …
4 years ago
John Molakvoæ (skjnldsv) 0f135c7bd6
Bump acceptance tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
4 years ago
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>
4 years ago
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst a8a06a82d2
Remove trailing whitespaces from comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
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>
4 years ago
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
4 years ago
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
4 years ago
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
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>
4 years ago
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>
4 years ago
Daniel Calviño Sánchez 887e740434 Fix timeout capping
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
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>
4 years ago
Daniel Calviño Sánchez 0896f33f86 Force compatible dependency versions in acceptance tests
behat/mink 1.8 and behat/mink-selenium2-driver 1.4 introduced behaviour
changes that broke the acceptance tests. Until the tests are updated to
work with the newer versions the last known versions are forced.

Note that some acceptance tests still fail after enforcing the
compatible versions, although that is caused by changes in the Nextcloud
server itself.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago