Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-07-21 22:25:18 +0300
committerGeorg Ehrke <developer@georgehrke.com>2020-07-22 16:59:35 +0300
commit9303390b66ffc50fc83ba7e6c251c065e88db227 (patch)
treed425895acf0d6a0080d4e9607c2b8e153f3e8bec /tests/acceptance
parent387b1d7b13e129a984a6c172f71cfb1724b1b575 (diff)
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>
Diffstat (limited to 'tests/acceptance')
-rw-r--r--tests/acceptance/features/bootstrap/FilesAppSharingContext.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
index 80d21a0faf9..9f02ab5cab5 100644
--- a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
+++ b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
@@ -328,6 +328,17 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
* @Given I write down the shared link
*/
public function iWriteDownTheSharedLink() {
+ // Close the share link menu if it is open to ensure that it does not
+ // cover the copy link button.
+ if (!WaitFor::elementToBeEventuallyNotShown(
+ $this->actor,
+ self::shareLinkMenu(),
+ $timeout = 2 * $this->actor->getFindTimeoutMultiplier())) {
+ // It may not be possible to click on the menu button (due to the
+ // menu itself covering it), so "Esc" key is pressed instead.
+ $this->actor->find(self::shareLinkMenu(), 2)->getWrappedElement()->keyPress(27);
+ }
+
$this->actor->find(self::copyLinkButton(), 10)->click();
// Clicking on the menu item copies the link to the clipboard, but it is