|
|
|
|
@ -46,6 +46,25 @@ class SettingsContext implements Context, ActorAwareInterface {
|
|
|
|
|
describedAs("Accept shares by default checkbox input in Sharing section in Personal Sharing Settings");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
public static function restrictUsernameAutocompletionToGroupsCheckbox() {
|
|
|
|
|
// forThe()->checkbox("Restrict username...") 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() = 'Restrict username autocompletion to users within the same groups']")->
|
|
|
|
|
describedAs("Restrict username autocompletion to groups checkbox in Sharing section in Administration Sharing Settings");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
public static function restrictUsernameAutocompletionToGroupsCheckboxInput() {
|
|
|
|
|
return Locator::forThe()->checkbox("Restrict username autocompletion to users within the same groups")->
|
|
|
|
|
describedAs("Restrict username autocompletion to groups checkbox input in Sharing section in Administration Sharing Settings");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Locator
|
|
|
|
|
*/
|
|
|
|
|
@ -112,6 +131,15 @@ class SettingsContext implements Context, ActorAwareInterface {
|
|
|
|
|
$this->actor->find(self::acceptSharesByDefaultCheckbox(), 2)->click();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @When I enable restricting username autocompletion to groups
|
|
|
|
|
*/
|
|
|
|
|
public function iEnableRestrictingUsernameAutocompletionToGroups() {
|
|
|
|
|
$this->iSeeThatUsernameAutocompletionIsNotRestrictedToGroups();
|
|
|
|
|
|
|
|
|
|
$this->actor->find(self::restrictUsernameAutocompletionToGroupsCheckbox(), 2)->click();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @When I create the tag :tag in the settings
|
|
|
|
|
*/
|
|
|
|
|
@ -129,6 +157,22 @@ class SettingsContext implements Context, ActorAwareInterface {
|
|
|
|
|
$this->actor->find(self::acceptSharesByDefaultCheckboxInput(), 10)->isChecked());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Then I see that username autocompletion is restricted to groups
|
|
|
|
|
*/
|
|
|
|
|
public function iSeeThatUsernameAutocompletionIsRestrictedToGroups() {
|
|
|
|
|
PHPUnit_Framework_Assert::assertTrue(
|
|
|
|
|
$this->actor->find(self::restrictUsernameAutocompletionToGroupsCheckboxInput(), 10)->isChecked());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Then I see that username autocompletion is not restricted to groups
|
|
|
|
|
*/
|
|
|
|
|
public function iSeeThatUsernameAutocompletionIsNotRestrictedToGroups() {
|
|
|
|
|
PHPUnit_Framework_Assert::assertFalse(
|
|
|
|
|
$this->actor->find(self::restrictUsernameAutocompletionToGroupsCheckboxInput(), 10)->isChecked());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Then I see that shares are not accepted by default
|
|
|
|
|
*/
|
|
|
|
|
|