You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tags.feature 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. Feature: tags
  2. Scenario: Creating a normal tag as regular user should work
  3. Given user "user0" exists
  4. When "user0" creates a "normal" tag with name "MySuperAwesomeTagName"
  5. Then The response should have a status code "201"
  6. And The following tags should exist for "admin"
  7. |MySuperAwesomeTagName|true|true|
  8. And The following tags should exist for "user0"
  9. |MySuperAwesomeTagName|true|true|
  10. Scenario: Creating a not user-assignable tag as regular user should fail
  11. Given user "user0" exists
  12. When "user0" creates a "not user-assignable" tag with name "MySuperAwesomeTagName"
  13. Then The response should have a status code "400"
  14. And "0" tags should exist for "admin"
  15. Scenario: Creating a not user-visible tag as regular user should fail
  16. Given user "user0" exists
  17. When "user0" creates a "not user-visible" tag with name "MySuperAwesomeTagName"
  18. Then The response should have a status code "400"
  19. And "0" tags should exist for "admin"
  20. Scenario: Creating a not user-assignable tag with groups as admin should work
  21. Given user "user0" exists
  22. When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2"
  23. Then The response should have a status code "201"
  24. And The "not user-assignable" tag with name "TagWithGroups" has the groups "group1|group2"
  25. Scenario: Creating a normal tag with groups as regular user should fail
  26. Given user "user0" exists
  27. When "user0" creates a "normal" tag with name "MySuperAwesomeTagName" and groups "group1|group2"
  28. Then The response should have a status code "400"
  29. And "0" tags should exist for "user0"
  30. Scenario: Renaming a normal tag as regular user should work
  31. Given user "user0" exists
  32. Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName"
  33. When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName"
  34. Then The response should have a status code "207"
  35. And The following tags should exist for "admin"
  36. |AnotherTagName|true|true|
  37. Scenario: Renaming a not user-assignable tag as regular user should fail
  38. Given user "user0" exists
  39. Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName"
  40. When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName"
  41. Then The response should have a status code "403"
  42. And The following tags should exist for "admin"
  43. |MySuperAwesomeTagName|true|false|
  44. Scenario: Renaming a not user-visible tag as regular user should fail
  45. Given user "user0" exists
  46. Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName"
  47. When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName"
  48. Then The response should have a status code "404"
  49. And The following tags should exist for "admin"
  50. |MySuperAwesomeTagName|false|true|
  51. Scenario: Editing tag groups as admin should work
  52. Given user "user0" exists
  53. Given "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2"
  54. When "admin" edits the tag with name "TagWithGroups" and sets its groups to "group1|group3"
  55. Then The response should have a status code "207"
  56. And The "not user-assignable" tag with name "TagWithGroups" has the groups "group1|group3"
  57. Scenario: Editing tag groups as regular user should fail
  58. Given user "user0" exists
  59. Given "admin" creates a "not user-assignable" tag with name "TagWithGroups"
  60. When "user0" edits the tag with name "TagWithGroups" and sets its groups to "group1|group3"
  61. Then The response should have a status code "403"
  62. Scenario: Deleting a normal tag as regular user should fail
  63. Given user "user0" exists
  64. Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName"
  65. When "user0" deletes the tag with name "MySuperAwesomeTagName"
  66. Then The response should have a status code "403"
  67. And The following tags should exist for "admin"
  68. |MySuperAwesomeTagName|true|true|
  69. Scenario: Deleting a not user-assignable tag as regular user should fail
  70. Given user "user0" exists
  71. Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName"
  72. When "user0" deletes the tag with name "MySuperAwesomeTagName"
  73. Then The response should have a status code "403"
  74. And The following tags should exist for "admin"
  75. |MySuperAwesomeTagName|true|false|
  76. Scenario: Deleting a not user-visible tag as regular user should fail
  77. Given user "user0" exists
  78. Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName"
  79. When "user0" deletes the tag with name "MySuperAwesomeTagName"
  80. Then The response should have a status code "404"
  81. And The following tags should exist for "admin"
  82. |MySuperAwesomeTagName|false|true|
  83. Scenario: Deleting a normal tag as admin should work
  84. Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName"
  85. When "admin" deletes the tag with name "MySuperAwesomeTagName"
  86. Then The response should have a status code "204"
  87. And "0" tags should exist for "admin"
  88. Scenario: Deleting a not user-assignable tag as admin should work
  89. Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName"
  90. When "admin" deletes the tag with name "MySuperAwesomeTagName"
  91. Then The response should have a status code "204"
  92. And "0" tags should exist for "admin"
  93. Scenario: Deleting a not user-visible tag as admin should work
  94. Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName"
  95. When "admin" deletes the tag with name "MySuperAwesomeTagName"
  96. Then The response should have a status code "204"
  97. And "0" tags should exist for "admin"
  98. Scenario: Assigning a normal tag to a file shared by someone else as regular user should work
  99. Given user "user0" exists
  100. Given user "12345" exists
  101. Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName"
  102. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  103. Given as "user0" creating a share with
  104. | path | myFileToTag.txt |
  105. | shareWith | 12345 |
  106. | shareType | 0 |
  107. Given user "12345" accepts last share
  108. When "12345" adds the tag "MySuperAwesomeTagName" to "/myFileToTag.txt" shared by "user0"
  109. Then The response should have a status code "201"
  110. And "/myFileToTag.txt" shared by "user0" has the following tags
  111. |MySuperAwesomeTagName|
  112. Scenario: Assigning a normal tag to a file belonging to someone else as regular user should fail
  113. Given user "user0" exists
  114. Given user "user1" exists
  115. Given "admin" creates a "normal" tag with name "MyFirstTag"
  116. Given "admin" creates a "normal" tag with name "MySecondTag"
  117. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  118. When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  119. When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  120. Then The response should have a status code "404"
  121. And "/myFileToTag.txt" shared by "user0" has the following tags
  122. |MyFirstTag|
  123. Scenario: Assigning a not user-assignable tag to a file shared by someone else as regular user should fail
  124. Given user "user0" exists
  125. Given user "user1" exists
  126. Given "admin" creates a "normal" tag with name "MyFirstTag"
  127. Given "admin" creates a "not user-assignable" tag with name "MySecondTag"
  128. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  129. Given as "user0" creating a share with
  130. | path | myFileToTag.txt |
  131. | shareWith | user1 |
  132. | shareType | 0 |
  133. Given user "user1" accepts last share
  134. When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  135. When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  136. Then The response should have a status code "403"
  137. And "/myFileToTag.txt" shared by "user0" has the following tags
  138. |MyFirstTag|
  139. Scenario: Assigning a not user-assignable tag to a file shared by someone else as regular user belongs to tag's groups should work
  140. Given user "user0" exists
  141. Given user "user1" exists
  142. Given group "group1" exists
  143. Given user "user1" belongs to group "group1"
  144. Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" and groups "group1"
  145. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  146. Given as "user0" creating a share with
  147. | path | myFileToTag.txt |
  148. | shareWith | user1 |
  149. | shareType | 0 |
  150. Given user "user1" accepts last share
  151. When "user1" adds the tag "MySuperAwesomeTagName" to "/myFileToTag.txt" shared by "user0"
  152. Then The response should have a status code "201"
  153. And "/myFileToTag.txt" shared by "user0" has the following tags
  154. |MySuperAwesomeTagName|
  155. Scenario: Assigning a not user-visible tag to a file shared by someone else as regular user should fail
  156. Given user "user0" exists
  157. Given user "user1" exists
  158. Given "admin" creates a "normal" tag with name "MyFirstTag"
  159. Given "admin" creates a "not user-visible" tag with name "MySecondTag"
  160. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  161. Given as "user0" creating a share with
  162. | path | myFileToTag.txt |
  163. | shareWith | user1 |
  164. | shareType | 0 |
  165. Given user "user1" accepts last share
  166. When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  167. When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  168. Then The response should have a status code "412"
  169. And "/myFileToTag.txt" shared by "user0" has the following tags
  170. |MyFirstTag|
  171. Scenario: Assigning a not user-visible tag to a file shared by someone else as admin user should work
  172. Given user "user0" exists
  173. Given "admin" creates a "normal" tag with name "MyFirstTag"
  174. Given "admin" creates a "not user-visible" tag with name "MySecondTag"
  175. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  176. Given as "user0" creating a share with
  177. | path | myFileToTag.txt |
  178. | shareWith | admin |
  179. | shareType | 0 |
  180. Given user "admin" accepts last share
  181. When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  182. When "admin" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  183. Then The response should have a status code "201"
  184. And "/myFileToTag.txt" shared by "user0" has the following tags for "admin"
  185. |MyFirstTag|
  186. |MySecondTag|
  187. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  188. |MyFirstTag|
  189. Scenario: Assigning a not user-assignable tag to a file shared by someone else as admin user should worj
  190. Given user "user0" exists
  191. Given "admin" creates a "normal" tag with name "MyFirstTag"
  192. Given "admin" creates a "not user-assignable" tag with name "MySecondTag"
  193. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  194. Given as "user0" creating a share with
  195. | path | myFileToTag.txt |
  196. | shareWith | admin |
  197. | shareType | 0 |
  198. Given user "admin" accepts last share
  199. When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  200. When "admin" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  201. Then The response should have a status code "201"
  202. And "/myFileToTag.txt" shared by "user0" has the following tags for "admin"
  203. |MyFirstTag|
  204. |MySecondTag|
  205. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  206. |MyFirstTag|
  207. |MySecondTag|
  208. Scenario: Unassigning a normal tag from a file shared by someone else as regular user should work
  209. Given user "user0" exists
  210. Given user "user1" exists
  211. Given "admin" creates a "normal" tag with name "MyFirstTag"
  212. Given "admin" creates a "normal" tag with name "MySecondTag"
  213. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  214. Given as "user0" creating a share with
  215. | path | myFileToTag.txt |
  216. | shareWith | user1 |
  217. | shareType | 0 |
  218. Given user "user1" accepts last share
  219. Given "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  220. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  221. When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  222. Then The response should have a status code "204"
  223. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  224. |MySecondTag|
  225. Scenario: Unassigning a normal tag from a file unshared by someone else as regular user should fail
  226. Given user "user0" exists
  227. Given user "user1" exists
  228. Given "admin" creates a "normal" tag with name "MyFirstTag"
  229. Given "admin" creates a "normal" tag with name "MySecondTag"
  230. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  231. Given "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  232. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  233. When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  234. Then The response should have a status code "404"
  235. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  236. |MyFirstTag|
  237. |MySecondTag|
  238. Scenario: Unassigning a not user-visible tag from a file shared by someone else as regular user should fail
  239. Given user "user0" exists
  240. Given user "user1" exists
  241. Given "admin" creates a "not user-visible" tag with name "MyFirstTag"
  242. Given "admin" creates a "normal" tag with name "MySecondTag"
  243. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  244. Given as "user0" creating a share with
  245. | path | myFileToTag.txt |
  246. | shareWith | user1 |
  247. | shareType | 0 |
  248. Given user "user1" accepts last share
  249. Given as "user0" creating a share with
  250. | path | myFileToTag.txt |
  251. | shareWith | admin |
  252. | shareType | 0 |
  253. Given user "admin" accepts last share
  254. Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  255. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  256. When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  257. Then The response should have a status code "404"
  258. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  259. |MySecondTag|
  260. And "/myFileToTag.txt" shared by "user0" has the following tags for "admin"
  261. |MyFirstTag|
  262. |MySecondTag|
  263. Scenario: Unassigning a not user-visible tag from a file shared by someone else as admin should work
  264. Given user "user0" exists
  265. Given user "user1" exists
  266. Given "admin" creates a "not user-visible" tag with name "MyFirstTag"
  267. Given "admin" creates a "normal" tag with name "MySecondTag"
  268. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  269. Given as "user0" creating a share with
  270. | path | myFileToTag.txt |
  271. | shareWith | user1 |
  272. | shareType | 0 |
  273. Given user "user1" accepts last share
  274. Given as "user0" creating a share with
  275. | path | myFileToTag.txt |
  276. | shareWith | admin |
  277. | shareType | 0 |
  278. Given user "admin" accepts last share
  279. Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  280. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  281. When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  282. Then The response should have a status code "204"
  283. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  284. |MySecondTag|
  285. And "/myFileToTag.txt" shared by "user0" has the following tags for "admin"
  286. |MySecondTag|
  287. Scenario: Unassigning a not user-visible tag from a file unshared by someone else should fail
  288. Given user "user0" exists
  289. Given user "user1" exists
  290. Given "admin" creates a "not user-visible" tag with name "MyFirstTag"
  291. Given "admin" creates a "normal" tag with name "MySecondTag"
  292. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  293. Given as "user0" creating a share with
  294. | path | myFileToTag.txt |
  295. | shareWith | user1 |
  296. | shareType | 0 |
  297. Given user "user1" accepts last share
  298. Given as "user0" creating a share with
  299. | path | myFileToTag.txt |
  300. | shareWith | admin |
  301. | shareType | 0 |
  302. Given user "admin" accepts last share
  303. Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  304. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  305. Given As "user0" remove all shares from the file named "/myFileToTag.txt"
  306. When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  307. Then The response should have a status code "404"
  308. Scenario: Unassigning a not user-assignable tag from a file shared by someone else as regular user should fail
  309. Given user "user0" exists
  310. Given user "user1" exists
  311. Given "admin" creates a "not user-assignable" tag with name "MyFirstTag"
  312. Given "admin" creates a "normal" tag with name "MySecondTag"
  313. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  314. Given as "user0" creating a share with
  315. | path | myFileToTag.txt |
  316. | shareWith | user1 |
  317. | shareType | 0 |
  318. Given user "user1" accepts last share
  319. Given as "user0" creating a share with
  320. | path | myFileToTag.txt |
  321. | shareWith | admin |
  322. | shareType | 0 |
  323. Given user "admin" accepts last share
  324. Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  325. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  326. When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  327. Then The response should have a status code "403"
  328. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  329. |MyFirstTag|
  330. |MySecondTag|
  331. And "/myFileToTag.txt" shared by "user0" has the following tags for "admin"
  332. |MyFirstTag|
  333. |MySecondTag|
  334. Scenario: Unassigning a not user-assignable tag from a file shared by someone else as admin should work
  335. Given user "user0" exists
  336. Given user "user1" exists
  337. Given "admin" creates a "not user-assignable" tag with name "MyFirstTag"
  338. Given "admin" creates a "normal" tag with name "MySecondTag"
  339. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  340. Given as "user0" creating a share with
  341. | path | myFileToTag.txt |
  342. | shareWith | user1 |
  343. | shareType | 0 |
  344. Given user "user1" accepts last share
  345. Given as "user0" creating a share with
  346. | path | myFileToTag.txt |
  347. | shareWith | admin |
  348. | shareType | 0 |
  349. Given user "admin" accepts last share
  350. Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  351. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  352. When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  353. Then The response should have a status code "204"
  354. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  355. |MySecondTag|
  356. And "/myFileToTag.txt" shared by "user0" has the following tags for "admin"
  357. |MySecondTag|
  358. Scenario: Unassigning a not user-assignable tag from a file unshared by someone else should fail
  359. Given user "user0" exists
  360. Given user "user1" exists
  361. Given "admin" creates a "not user-assignable" tag with name "MyFirstTag"
  362. Given "admin" creates a "normal" tag with name "MySecondTag"
  363. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  364. Given as "user0" creating a share with
  365. | path | myFileToTag.txt |
  366. | shareWith | user1 |
  367. | shareType | 0 |
  368. Given user "user1" accepts last share
  369. Given as "user0" creating a share with
  370. | path | myFileToTag.txt |
  371. | shareWith | admin |
  372. | shareType | 0 |
  373. Given user "admin" accepts last share
  374. Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  375. Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0"
  376. Given As "user0" remove all shares from the file named "/myFileToTag.txt"
  377. When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0"
  378. Then The response should have a status code "404"
  379. Scenario: Overwriting existing normal tags should fail
  380. Given user "user0" exists
  381. Given "user0" creates a "normal" tag with name "MyFirstTag"
  382. When "user0" creates a "normal" tag with name "MyFirstTag"
  383. Then The response should have a status code "409"
  384. Scenario: Overwriting existing not user-assignable tags should fail
  385. Given "admin" creates a "not user-assignable" tag with name "MyFirstTag"
  386. When "admin" creates a "not user-assignable" tag with name "MyFirstTag"
  387. Then The response should have a status code "409"
  388. Scenario: Overwriting existing not user-visible tags should fail
  389. Given "admin" creates a "not user-visible" tag with name "MyFirstTag"
  390. When "admin" creates a "not user-visible" tag with name "MyFirstTag"
  391. Then The response should have a status code "409"
  392. Scenario: Getting tags only works with access to the file
  393. Given user "user0" exists
  394. Given user "user1" exists
  395. Given "admin" creates a "normal" tag with name "MyFirstTag"
  396. Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt"
  397. When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0"
  398. And "/myFileToTag.txt" shared by "user0" has the following tags for "user0"
  399. |MyFirstTag|
  400. And "/myFileToTag.txt" shared by "user0" has the following tags for "user1"
  401. ||
  402. And The response should have a status code "404"
  403. Scenario: User can assign tags when in the tag's groups
  404. Given user "user0" exists
  405. Given group "group1" exists
  406. Given user "user0" belongs to group "group1"
  407. When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2"
  408. Then The response should have a status code "201"
  409. And the user "user0" can assign the "not user-assignable" tag with name "TagWithGroups"
  410. Scenario: User cannot assign tags when not in the tag's groups
  411. Given user "user0" exists
  412. When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2"
  413. Then The response should have a status code "201"
  414. And the user "user0" cannot assign the "not user-assignable" tag with name "TagWithGroups"
  415. Scenario: Assign a normal tag to a file
  416. Given user "user0" exists
  417. And "admin" creates a "normal" tag with name "Etiqueta"
  418. And As an "user0"
  419. When "user0" adds the tag "Etiqueta" to "/textfile0.txt" owned by "user0"
  420. Then The response should have a status code "201"
  421. And "textfile0.txt" owned by "user0" has the following tags
  422. | Etiqueta |