favorites.feature 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. Feature: favorite
  2. Background:
  3. Given using api version "1"
  4. Scenario: Favorite a folder
  5. Given using old dav path
  6. And As an "admin"
  7. And user "user0" exists
  8. When user "user0" favorites element "/FOLDER"
  9. Then as "user0" gets properties of folder "/FOLDER" with
  10. |{http://owncloud.org/ns}favorite|
  11. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1"
  12. Scenario: Favorite and unfavorite a folder
  13. Given using old dav path
  14. And As an "admin"
  15. And user "user0" exists
  16. When user "user0" favorites element "/FOLDER"
  17. And user "user0" unfavorites element "/FOLDER"
  18. Then as "user0" gets properties of folder "/FOLDER" with
  19. |{http://owncloud.org/ns}favorite|
  20. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
  21. Scenario: Favorite a file
  22. Given using old dav path
  23. And As an "admin"
  24. And user "user0" exists
  25. When user "user0" favorites element "/textfile0.txt"
  26. Then as "user0" gets properties of file "/textfile0.txt" with
  27. |{http://owncloud.org/ns}favorite|
  28. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1"
  29. Scenario: Favorite and unfavorite a file
  30. Given using old dav path
  31. And As an "admin"
  32. And user "user0" exists
  33. When user "user0" favorites element "/textfile0.txt"
  34. And user "user0" unfavorites element "/textfile0.txt"
  35. Then as "user0" gets properties of file "/textfile0.txt" with
  36. |{http://owncloud.org/ns}favorite|
  37. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
  38. Scenario: Favorite a folder new endpoint
  39. Given using new dav path
  40. And As an "admin"
  41. And user "user0" exists
  42. When user "user0" favorites element "/FOLDER"
  43. Then as "user0" gets properties of folder "/FOLDER" with
  44. |{http://owncloud.org/ns}favorite|
  45. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1"
  46. Scenario: Favorite and unfavorite a folder new endpoint
  47. Given using new dav path
  48. And As an "admin"
  49. And user "user0" exists
  50. When user "user0" favorites element "/FOLDER"
  51. And user "user0" unfavorites element "/FOLDER"
  52. Then as "user0" gets properties of folder "/FOLDER" with
  53. |{http://owncloud.org/ns}favorite|
  54. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
  55. Scenario: Favorite a file new endpoint
  56. Given using new dav path
  57. And As an "admin"
  58. And user "user0" exists
  59. When user "user0" favorites element "/textfile0.txt"
  60. Then as "user0" gets properties of file "/textfile0.txt" with
  61. |{http://owncloud.org/ns}favorite|
  62. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1"
  63. Scenario: Favorite and unfavorite a file new endpoint
  64. Given using new dav path
  65. And As an "admin"
  66. And user "user0" exists
  67. When user "user0" favorites element "/textfile0.txt"
  68. And user "user0" unfavorites element "/textfile0.txt"
  69. Then as "user0" gets properties of file "/textfile0.txt" with
  70. |{http://owncloud.org/ns}favorite|
  71. And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"
  72. Scenario: Get favorited elements of a folder
  73. Given using old dav path
  74. And As an "admin"
  75. And user "user0" exists
  76. When user "user0" favorites element "/FOLDER"
  77. And user "user0" favorites element "/textfile0.txt"
  78. And user "user0" favorites element "/textfile1.txt"
  79. Then user "user0" in folder "/" should have favorited the following elements
  80. | /FOLDER |
  81. | /textfile0.txt |
  82. | /textfile1.txt |
  83. Scenario: Get favorited elements of a folder using new path
  84. Given using new dav path
  85. And As an "admin"
  86. And user "user0" exists
  87. When user "user0" favorites element "/FOLDER"
  88. And user "user0" favorites element "/textfile0.txt"
  89. And user "user0" favorites element "/textfile1.txt"
  90. Then user "user0" in folder "/" should have favorited the following elements
  91. | /FOLDER |
  92. | /textfile0.txt |
  93. | /textfile1.txt |
  94. Scenario: Get favorited elements of a subfolder
  95. Given using old dav path
  96. And As an "admin"
  97. And user "user0" exists
  98. And user "user0" created a folder "/subfolder"
  99. And User "user0" moves file "/textfile0.txt" to "/subfolder/textfile0.txt"
  100. And User "user0" moves file "/textfile1.txt" to "/subfolder/textfile1.txt"
  101. And User "user0" moves file "/textfile2.txt" to "/subfolder/textfile2.txt"
  102. When user "user0" favorites element "/subfolder/textfile0.txt"
  103. And user "user0" favorites element "/subfolder/textfile1.txt"
  104. And user "user0" favorites element "/subfolder/textfile2.txt"
  105. And user "user0" unfavorites element "/subfolder/textfile1.txt"
  106. Then user "user0" in folder "/subfolder" should have favorited the following elements
  107. | /subfolder/textfile0.txt |
  108. | /subfolder/textfile2.txt |
  109. Scenario: Get favorited elements of a subfolder using new path
  110. Given using old dav path
  111. And As an "admin"
  112. And user "user0" exists
  113. And user "user0" created a folder "/subfolder"
  114. And User "user0" moves file "/textfile0.txt" to "/subfolder/textfile0.txt"
  115. And User "user0" moves file "/textfile1.txt" to "/subfolder/textfile1.txt"
  116. And User "user0" moves file "/textfile2.txt" to "/subfolder/textfile2.txt"
  117. When user "user0" favorites element "/subfolder/textfile0.txt"
  118. And user "user0" favorites element "/subfolder/textfile1.txt"
  119. And user "user0" favorites element "/subfolder/textfile2.txt"
  120. And user "user0" unfavorites element "/subfolder/textfile1.txt"
  121. Then user "user0" in folder "/subfolder" should have favorited the following elements
  122. | /subfolder/textfile0.txt |
  123. | /subfolder/textfile2.txt |
  124. Scenario: moving a favorite file out of a share keeps favorite state
  125. Given using old dav path
  126. And As an "admin"
  127. And user "user0" exists
  128. And user "user1" exists
  129. And user "user0" created a folder "/shared"
  130. And User "user0" moved file "/textfile0.txt" to "/shared/shared_file.txt"
  131. And folder "/shared" of user "user0" is shared with user "user1"
  132. And user "user1" accepts last share
  133. And user "user1" favorites element "/shared/shared_file.txt"
  134. When User "user1" moved file "/shared/shared_file.txt" to "/taken_out.txt"
  135. Then user "user1" in folder "/" should have favorited the following elements
  136. | /taken_out.txt |