test: ensure share is available before performing actions

test: fix expected-failure lines
This commit is contained in:
Saw-jan
2024-07-26 15:19:33 +05:45
parent 24b940dfcc
commit 878c5f4075
38 changed files with 302 additions and 83 deletions
@@ -218,6 +218,7 @@ Feature: copying file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
And user "Brian" has uploaded file with content "some data" to "/test.txt"
And we save it into "FILEID"
And user "Brian" has a share "folder" synced
@@ -23,6 +23,7 @@ Feature: checking file versions using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <role> |
And user "Brian" has a share "text.txt" synced
When user "Alice" gets the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
Then the HTTP status code should be "207"
And the number of versions should be "1"
@@ -70,6 +71,7 @@ Feature: checking file versions using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <role> |
And user "Brian" has a share "text.txt" synced
And user "Alice" has moved file "text.txt" to "/testFolder/movedText.txt" in space "Project1"
When user "Alice" gets the number of versions of file "/testFolder/movedText.txt" using file-id path "/meta/<<FILEID>>/v"
Then the HTTP status code should be "207"
@@ -90,6 +92,7 @@ Feature: checking file versions using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "testFolder" synced
And user "Alice" has sent the following space share invitation:
| space | Project1 |
| sharee | Brian |
@@ -57,6 +57,7 @@ Feature: accessing files using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" sends HTTP method "GET" to URL "<dav-path>"
Then the HTTP status code should be "200"
And the downloaded content should be "some data"
@@ -77,6 +78,7 @@ Feature: accessing files using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "uploadFolder" synced
When user "Brian" sends HTTP method "GET" to URL "<dav-path>"
Then the HTTP status code should be "200"
And the downloaded content should be "some data"
@@ -96,6 +96,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "folder" synced
And user "Brian" has uploaded file with content "some data" to "/test.txt"
And we save it into "FILEID"
When user "Brian" moves a file "test.txt" into "folder" inside space "Shares" using file-id path "<dav-path>"
@@ -372,6 +373,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "testshare" synced
When user "Brian" moves a file "textfile.txt" into "testshare" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "502"
And for user "Brian" folder "/" of the space "project-space" should contain these files:
@@ -451,6 +453,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "folder" synced
When user "Brian" moves a file "Shares/folder/test.txt" into "folder/sub-folder" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files:
@@ -504,6 +507,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folder" synced
When user "Brian" moves a file "Shares/folder/test.txt" into "folder/sub-folder" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "502"
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should not contain these files:
@@ -532,12 +536,14 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <from-permissions> |
And user "Brian" has a share "testshare1" synced
And user "Alice" has sent the following resource share invitation:
| resource | testshare2 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <to-permissions> |
And user "Brian" has a share "testshare2" synced
When user "Brian" moves a file "Shares/testshare1/textfile.txt" into "testshare2" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "502"
And for user "Brian" folder "testshare1" of the space "Shares" should contain these files:
@@ -567,6 +573,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "folder" synced
When user "Brian" moves a file "Shares/folder/test.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
Then the HTTP status code should be "<http-status-code>"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
@@ -599,6 +606,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions> |
And user "Brian" has a share "testshare" synced
When user "Brian" moves a file "Shares/testshare/textfile.txt" into "/" inside space "project-space" using file-id path "<dav-path>"
Then the HTTP status code should be "<http-status-code>"
And for user "Brian" folder "testshare" of the space "Shares" should contain these files:
@@ -714,6 +722,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
When user "Brian" renames a file "Shares/folder/test.txt" into "folder/sub-folder/renamed.txt" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Brian" folder "folder/sub-folder" of the space "Shares" should contain these files:
@@ -738,6 +747,7 @@ Feature: moving/renaming file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "folder" synced
When user "Brian" renames a file "Shares/folder/test.txt" into "folder/sub-folder/renamed.txt" inside space "Shares" using file-id path "<dav-path>"
Then the HTTP status code should be "502"
And for user "Brian" folder "folder" of the space "Shares" should contain these files:
@@ -110,6 +110,7 @@ Feature: propfind a file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "207"
And the "PROPFIND" response to user "Alice" should contain a mountpoint "Brian Murphy" with these key and value pairs:
@@ -131,6 +132,7 @@ Feature: propfind a file using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "folder" synced
And user "Alice" has uploaded file with content "some data" to "/folder/textfile.txt"
And we save it into "FILEID"
When user "Brian" sends HTTP method "PROPFIND" to URL "<dav-path>"
@@ -57,6 +57,7 @@ Feature: update files using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" sends HTTP method "PUT" to URL "<dav-path>" with content "updated content"
Then the HTTP status code should be "204"
And for user "Alice" the content of the file "/textfile.txt" of the space "Personal" should be "updated content"
@@ -78,6 +79,7 @@ Feature: update files using file id
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "uploadFolder" synced
When user "Brian" sends HTTP method "PUT" to URL "<dav-path>" with content "updated content"
Then the HTTP status code should be "204"
And for user "Alice" the content of the file "uploadFolder/textfile.txt" of the space "Personal" should be "updated content"