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:
authorJulius Härtl <jus@bitgrid.net>2021-06-09 11:43:50 +0300
committerJulius Härtl <jus@bitgrid.net>2021-06-09 11:43:50 +0300
commit964fd27666192beb7929342f10ae27cef3455d8b (patch)
tree9bfb1b40d2125a899315a04d0c89c16fa0edde1d /tests/acceptance
parent9467a9386629468c3ddf3c77de2db6b9621e972f (diff)
Handle single action unshare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/acceptance')
-rw-r--r--tests/acceptance/features/bootstrap/FilesAppSharingContext.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
index e3b63476fff..d71b0196dbb 100644
--- a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
+++ b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
@@ -223,6 +223,15 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
/**
* @return Locator
*/
+ public static function shareLinkSingleUnshareAction() {
+ return Locator::forThe()->css(".sharing-entry__actions.icon-close")->
+ descendantOf(self::shareLinkRow())->
+ describedAs("Unshare link single action in the details view in Files app");
+ }
+
+ /**
+ * @return Locator
+ */
public static function shareLinkMenuButton() {
return Locator::forThe()->css(".action-item__menutoggle")->
descendantOf(self::shareLinkMenuTrigger())->
@@ -505,10 +514,13 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
* @When I unshare the link share
*/
public function iUnshareTheLink() {
- $this->showShareLinkMenuIfNeeded();
-
- $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
- $this->actor->find(self::unshareLinkButton($shareLinkMenuTriggerElement), 2)->click();
+ try {
+ $this->actor->find(self::shareLinkSingleUnshareAction(), 2)->click();
+ } catch (NoSuchElementException $e) {
+ $this->showShareLinkMenuIfNeeded();
+ $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
+ $this->actor->find(self::unshareLinkButton($shareLinkMenuTriggerElement), 2)->click();
+ }
}
/**