diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-11-18 03:27:16 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-11-24 23:50:54 +0000 |
commit | 4ffc022c8b5d2a4df3b1b1452de769c4ad27fe4f (patch) | |
tree | 393ecabc260dbe942dfe62a366bbecdf27fc5c90 /tests/acceptance/features/bootstrap | |
parent | 28f41059051afaf665e80e69ea2e90251aa1662e (diff) | |
download | nextcloud-server-4ffc022c8b5d2a4df3b1b1452de769c4ad27fe4f.tar.gz nextcloud-server-4ffc022c8b5d2a4df3b1b1452de769c4ad27fe4f.zip |
Copy to clipboard with button instead of link
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'tests/acceptance/features/bootstrap')
-rw-r--r-- | tests/acceptance/features/bootstrap/FilesAppSharingContext.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php index 95398423e3b..a6ae90d32d0 100644 --- a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php +++ b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php @@ -206,7 +206,7 @@ class FilesAppSharingContext implements Context, ActorAwareInterface { * @return Locator */ public static function copyLinkButton() { - return Locator::forThe()->css("a.sharing-entry__copy")-> + return Locator::forThe()->css("button.sharing-entry__copy")-> descendantOf(self::shareLinkRow())-> describedAs("Copy link button in the details view in Files app"); } @@ -391,7 +391,7 @@ class FilesAppSharingContext implements Context, ActorAwareInterface { // Clicking on the menu item copies the link to the clipboard, but it is // not possible to access that value from the acceptance tests. Due to // this the value of the attribute that holds the URL is used instead. - $this->actor->getSharedNotebook()["shared link"] = $this->actor->find(self::copyLinkButton(), 2)->getWrappedElement()->getAttribute("href"); + $this->actor->getSharedNotebook()["shared link"] = $this->actor->getSession()->evaluateScript("return document.querySelector('.sharing-entry__link').__vue__.shareLink;"); } /** |