Commit Graph

130 Commits

Author SHA1 Message Date
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
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
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
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
GretaD 455013c309
fix the folder share
Signed-off-by: GretaD <gretadoci@gmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-12-19 16:14:47 +01:00
Greta Doci c864bc8321
Move users management to multi line
Signed-off-by: Greta Doci <gretadoci@gmail.com>
2019-12-12 12:25:13 +01:00
Daniel Calviño Sánchez f402e23448 Accept incoming shares in acceptance tests
Incoming shares are no longer automatically added to the file list of
the sharee. Instead, the user now needs to explictly accept the share.

Currently shares can be accepted only from the Notifications app, so it
must be explicitly cloned before installing Nextcloud if it is not found
in the "apps" directory. Note that the development branches are already
built, so there is no need to explicitly build the app.

With the new sharing behaviour the "share a skeleton file with another
user before first login" scenario is no longer valid (as the user will
need to log in to accept the share, so at that point the skeleton is
already created), so it was removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-11-20 21:15:46 +01:00
Daniel Calviño Sánchez 0abff19aa9 Rename "Notification" to "Toast"
Since Nextcloud 17 the proper name for the old built-in notifications is
"Toast". Moreover, this will reduce ambiguity when using the
"notification" term to refer to elements in the Notifications app.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-11-20 21:15:46 +01:00
John Molakvoæ (skjnldsv) 12eba18bdf Adjust acceptance tests to new OCA.Sidebar
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-29 13:20:08 +01:00
John Molakvoæ (skjnldsv) 4293ede565
Fix tag acceptance tests after #16682
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 07:48:45 +02:00
John Molakvoæ (skjnldsv) f737dc9a86 Remove input id on login form
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-09-28 08:15:03 +00:00
Greta Doci 1993984769 Adjust acceptance tests to changes in link share menu behaviour
Now the link share menu is not automatically opened after a link share
is created, so waiting until it was opened failed in iShareTheLinkFor.

Note that the steps that interact with the link share menu take care
themselves of showing the menu if needed, so there is no need to
explicitly show it despite the change. Also, the waiting in
iShareTheLinkFor was introduced when the link share menu was changed
to automatically open after creating a link share, as that caused some
issues with the steps that opened the menu by themselves (fec8d12fc5).
Due to all this, now that the link share menu is again not automatically
opened the wait can be simply removed.

Signed-off-by: Greta Doci <gretadoci@gmail.com>
2019-08-29 10:19:03 +02:00
John Molakvoæ b3bfae8cfe
Adjust acceptance tests to notifications based on toastify (#15938)
Adjust acceptance tests to notifications based on toastify
2019-06-13 14:04:50 +02:00
Daniel Calviño Sánchez e65fd11419 Add messages to assertFalse/True to clarify the failed assertion
Otherwise the output would just read "Failed asserting that true is
false." or "Failed asserting that false is true.", which is not very
informative when there are several assertFalse/True in a row.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-06-12 15:32:40 +02:00
Daniel Calviño Sánchez df8406dbae Adjust acceptance tests to notifications based on toastify
The old notifications were added as ".row" elements to the
"#notification-container" element; the new notifications based on
toastify are added as ".toastify .on .toast..." elements to the
"#content" element. Besides that, they also include a span element with
an X to close the notification, so now only the first child text node
should be compared to the expected message.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-06-12 14:32:15 +02:00
Daniel Calviño Sánchez ace4449924 Adjust acceptance tests to changes of file names in file picker
File names are no longer shown directly in the ".filename" element, but
split in two "span" elements inside a ".filename-parts" element, so now
the texts in those span elements need to be concatenated to get the file
name.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-04-03 16:29:52 +02:00
Morris Jobke 970d52fc29
Adjust acceptance tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-18 14:16:40 +01:00
Morris Jobke 77cf702220
Fix acceptance tests for wrong password message due to changed message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-11 11:54:38 +01:00
Daniel Calviño Sánchez 42457c8b23 Add acceptance tests for moving and copying selections to another folder
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-22 12:36:13 +01:00
Daniel Calviño Sánchez 4fcabf167e Add acceptance tests for moving and copying files to another folder
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-22 12:27:06 +01:00
Daniel Calviño Sánchez 4566670fa3 Add acceptance tests for opening search results for comments
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-12-21 20:14:38 +01:00
Daniel Calviño Sánchez 1a887aaad0 Add acceptance tests for searching comments
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-12-21 20:14:16 +01:00
Daniel Calviño Sánchez 6cee8ba827 Add acceptance tests for comments on shared files and folders
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-12-06 18:31:42 +01:00
Morris Jobke 217002701e
Merge pull request #12649 from nextcloud/make-acceptance-tests-for-comments-more-robust
Make acceptance tests for comments more robust
2018-11-26 11:23:01 +01:00
Daniel Calviño Sánchez d5725cb3d9 Wait for the empty content element to be shown
When the "Comments" tab is open the empty content element is always in
the DOM, although it is only shown once the message collection was
fetched and there were no messages. Due to this it is necessary to
explicitly wait for it to be shown instead of relying on the implicit
wait made to find the element; otherwise it would be found immediately
and if the collection was not fetched yet it would not be visible,
causing the test to fail.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-24 18:06:20 +01:00
Daniel Calviño Sánchez 4d4032bca3 Rename "FilesSharingAppContext" to "PublicShareContext"
Having both "FilesAppSharingContext" and "FilesSharingAppContext" was
confusing, so "FilesSharingAppContext" was renamed to a more descriptive
name.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:16 +01:00
Daniel Calviño Sánchez 87d4fb777a Extract locators and steps for sharing in Files app to their own context
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:16 +01:00
Daniel Calviño Sánchez 75b734ec98 Add acceptance tests for folders that can not be reshared
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00
Daniel Calviño Sánchez 7aaf5e6a4c Add acceptance test for resharing a file with another user
To reshare a file there must be at least three enabled users in the
system; although it would be possible to run the steps to create a third
user in the scenarios that need it for convenience a third enabled user
besides "admin" and "user0" was added to the default setup.

In a similar way, a new step was added too to login as a given user
name, similar to the steps to log in as "user0" and as "admin".

Finally, another actor, "Jim", was introduced for those scenarios which
should be played by three standard actors (that is, without a special
configuration like "Rubeus").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-23 15:13:15 +01:00