|
|
|
@ -232,6 +232,27 @@ class FilesAppContext implements Context, ActorAwareInterface { |
|
|
|
describedAs("Copy link menu item in the share link menu in the details view in Files app"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return Locator |
|
|
|
*/ |
|
|
|
public static function hideDownloadCheckbox() { |
|
|
|
// forThe()->checkbox("Hide download") can not be used here; that would
|
|
|
|
// return the checkbox itself, but the element that the user interacts
|
|
|
|
// with is the label.
|
|
|
|
return Locator::forThe()->xpath("//label[normalize-space() = 'Hide download']")-> |
|
|
|
descendantOf(self::shareLinkMenu())-> |
|
|
|
describedAs("Hide download checkbox in the details view in Files app"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return Locator |
|
|
|
*/ |
|
|
|
public static function hideDownloadCheckboxInput() { |
|
|
|
return Locator::forThe()->checkbox("Hide download")-> |
|
|
|
descendantOf(self::shareLinkMenu())-> |
|
|
|
describedAs("Hide download checkbox input in the details view in Files app"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @return Locator |
|
|
|
*/ |
|
|
|
@ -334,6 +355,28 @@ class FilesAppContext implements Context, ActorAwareInterface { |
|
|
|
$this->actor->find(self::itemInDropdownForTag($tag), 10)->click(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @When I set the download of the shared link as hidden |
|
|
|
*/ |
|
|
|
public function iSetTheDownloadOfTheSharedLinkAsHidden() { |
|
|
|
$this->showShareLinkMenuIfNeeded(); |
|
|
|
|
|
|
|
$this->iSeeThatTheDownloadOfTheLinkShareIsShown(); |
|
|
|
|
|
|
|
$this->actor->find(self::hideDownloadCheckbox(), 2)->click(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @When I set the download of the shared link as shown |
|
|
|
*/ |
|
|
|
public function iSetTheDownloadOfTheSharedLinkAsShown() { |
|
|
|
$this->showShareLinkMenuIfNeeded(); |
|
|
|
|
|
|
|
$this->iSeeThatTheDownloadOfTheLinkShareIsHidden(); |
|
|
|
|
|
|
|
$this->actor->find(self::hideDownloadCheckbox(), 2)->click(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @When I set the shared link as editable |
|
|
|
*/ |
|
|
|
@ -460,6 +503,24 @@ class FilesAppContext implements Context, ActorAwareInterface { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Then I see that the download of the link share is hidden |
|
|
|
*/ |
|
|
|
public function iSeeThatTheDownloadOfTheLinkShareIsHidden() { |
|
|
|
$this->showShareLinkMenuIfNeeded(); |
|
|
|
|
|
|
|
PHPUnit_Framework_Assert::assertTrue($this->actor->find(self::hideDownloadCheckboxInput(), 10)->isChecked()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Then I see that the download of the link share is shown |
|
|
|
*/ |
|
|
|
public function iSeeThatTheDownloadOfTheLinkShareIsShown() { |
|
|
|
$this->showShareLinkMenuIfNeeded(); |
|
|
|
|
|
|
|
PHPUnit_Framework_Assert::assertFalse($this->actor->find(self::hideDownloadCheckboxInput(), 10)->isChecked()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Then I see that the working icon for password protect is shown |
|
|
|
*/ |
|
|
|
|