mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 00:02:54 -04:00
Handle single action unshare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
b7328fab42
commit
c3e7687cd2
1 changed files with 16 additions and 4 deletions
|
|
@ -218,6 +218,15 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
|
|||
describedAs("Share link menu trigger in the details view in Files app");
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
|
@ -503,10 +512,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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue