Added functionaly for not shared elements
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
fbbd833ed1
commit
b0a3b25724
|
@ -516,13 +516,13 @@ class TagsContext implements \Behat\Behat\Context\Context {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @When :taggingUser adds the tag :tagName to :fileName shared by :sharingUser
|
* @When /^"([^"]*)" adds the tag "([^"]*)" to "([^"]*)" (shared|owned) by "([^"]*)"$/
|
||||||
* @param string $taggingUser
|
* @param string $taggingUser
|
||||||
* @param string $tagName
|
* @param string $tagName
|
||||||
* @param string $fileName
|
* @param string $fileName
|
||||||
* @param string $sharingUser
|
* @param string $sharingUser
|
||||||
*/
|
*/
|
||||||
public function addsTheTagToSharedBy($taggingUser, $tagName, $fileName, $sharingUser) {
|
public function addsTheTagToSharedBy($taggingUser, $tagName, $fileName, $sharedOrOwnedBy, $sharingUser) {
|
||||||
$fileId = $this->getFileIdForPath($fileName, $sharingUser);
|
$fileId = $this->getFileIdForPath($fileName, $sharingUser);
|
||||||
$tagId = $this->findTagIdByName($tagName);
|
$tagId = $this->findTagIdByName($tagName);
|
||||||
|
|
||||||
|
@ -542,13 +542,13 @@ class TagsContext implements \Behat\Behat\Context\Context {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then :fileName shared by :sharingUser has the following tags
|
* @Then /^"([^"]*)" (shared|owned) by "([^"]*)" has the following tags$/
|
||||||
* @param string $fileName
|
* @param string $fileName
|
||||||
* @param string $sharingUser
|
* @param string $sharingUser
|
||||||
* @param TableNode $table
|
* @param TableNode $table
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function sharedByHasTheFollowingTags($fileName, $sharingUser, TableNode $table) {
|
public function sharedByHasTheFollowingTags($fileName, $sharedOrOwnedBy, $sharingUser, TableNode $table) {
|
||||||
$loadedExpectedTags = $table->getTable();
|
$loadedExpectedTags = $table->getTable();
|
||||||
$expectedTags = [];
|
$expectedTags = [];
|
||||||
foreach($loadedExpectedTags as $expected) {
|
foreach($loadedExpectedTags as $expected) {
|
||||||
|
|
|
@ -425,3 +425,12 @@ Feature: tags
|
||||||
Then The response should have a status code "201"
|
Then The response should have a status code "201"
|
||||||
And the user "user0" cannot assign the "not user-assignable" tag with name "TagWithGroups"
|
And the user "user0" cannot assign the "not user-assignable" tag with name "TagWithGroups"
|
||||||
|
|
||||||
|
Scenario: Assign a normal tag to a file
|
||||||
|
Given user "user0" exists
|
||||||
|
And "admin" creates a "normal" tag with name "Etiqueta"
|
||||||
|
And As an "user0"
|
||||||
|
When "user0" adds the tag "Etiqueta" to "/textfile0.txt" owned by "user0"
|
||||||
|
Then The response should have a status code "201"
|
||||||
|
And "textfile0.txt" owned by "user0" has the following tags
|
||||||
|
| Etiqueta |
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue