Added functionaly for not shared elements
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
fbbd833ed1
commit
b0a3b25724
2 changed files with 13 additions and 4 deletions
|
@ -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 $tagName
|
||||
* @param string $fileName
|
||||
* @param string $sharingUser
|
||||
*/
|
||||
public function addsTheTagToSharedBy($taggingUser, $tagName, $fileName, $sharingUser) {
|
||||
public function addsTheTagToSharedBy($taggingUser, $tagName, $fileName, $sharedOrOwnedBy, $sharingUser) {
|
||||
$fileId = $this->getFileIdForPath($fileName, $sharingUser);
|
||||
$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 $sharingUser
|
||||
* @param TableNode $table
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function sharedByHasTheFollowingTags($fileName, $sharingUser, TableNode $table) {
|
||||
public function sharedByHasTheFollowingTags($fileName, $sharedOrOwnedBy, $sharingUser, TableNode $table) {
|
||||
$loadedExpectedTags = $table->getTable();
|
||||
$expectedTags = [];
|
||||
foreach($loadedExpectedTags as $expected) {
|
||||
|
|
|
@ -425,3 +425,12 @@ Feature: tags
|
|||
Then The response should have a status code "201"
|
||||
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 a new issue