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
@@ -173,6 +173,7 @@ Feature: lock files
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" locks file "/Shares/textfile.txt" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "200"
@@ -198,6 +199,7 @@ Feature: lock files
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" locks file "textfile.txt" using file-id path "<dav-path>" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |
@@ -223,6 +225,7 @@ Feature: lock files
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" tries to lock file "textfile.txt" using file-id path "/dav/spaces/<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "403"
@@ -241,6 +244,7 @@ Feature: lock files
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
And user "Alice" has locked file "textfile.txt" setting the following properties
| lockscope | exclusive |
When user "Brian" tries to lock file "textfile.txt" using file-id path "/dav/spaces/<<FILEID>>" using the WebDAV API setting the following properties
@@ -264,6 +268,7 @@ Feature: lock files
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
And user "Brian" has locked file "textfile.txt" using file-id path "/dav/spaces/<<FILEID>>" setting the following properties
| lockscope | exclusive |
When user "Alice" tries to lock file "textfile.txt" using file-id path "/dav/spaces/<<FILEID>>" using the WebDAV API setting the following properties
@@ -288,6 +293,7 @@ Feature: lock files
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | shared |
And user "Brian" has locked file "Shares/textfile0.txt" setting the following properties
@@ -342,12 +348,14 @@ Feature: lock files
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
And user "Carol" has a share "FromAlice" synced
And user "Brian" has sent the following resource share invitation:
| resource | FromBrian |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
And user "Carol" has a share "FromBrian" synced
When user "Carol" locks file "/Shares/FromBrian/textfile0.txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
@@ -375,12 +383,14 @@ Feature: lock files
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "locked" synced
And user "Alice" has sent the following resource share invitation:
| resource | notlocked |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "notlocked" synced
When user "Brian" locks file "/Shares/locked/textfile0.txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
@@ -103,6 +103,7 @@ Feature: unlock locked items
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "parent.txt" synced
And user "Alice" has locked file "PARENT/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Brian" unlocks file "Shares/parent.txt" with the last created lock of file "PARENT/parent.txt" of user "Alice" using the WebDAV API
@@ -132,6 +133,7 @@ Feature: unlock locked items
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
When user "Brian" unlocks file "Shares/PARENT/parent.txt" with the last created lock of file "PARENT/parent.txt" of user "Alice" using the WebDAV API
Then the HTTP status code should be "403"
And 1 locks should be reported for file "PARENT/parent.txt" of user "Alice" by the WebDAV API
@@ -157,6 +159,7 @@ Feature: unlock locked items
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "parent.txt" synced
And user "Brian" has locked file "Shares/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Brian" unlocks the last created lock of file "Shares/parent.txt" using the WebDAV API
@@ -184,6 +187,7 @@ Feature: unlock locked items
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "parent.txt" synced
And user "Brian" has locked file "Shares/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" unlocks file "PARENT/parent.txt" with the last created lock of file "Shares/parent.txt" of user "Brian" using the WebDAV API
@@ -211,6 +215,7 @@ Feature: unlock locked items
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
And user "Brian" has locked file "Shares/PARENT/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" unlocks file "PARENT/parent.txt" with the last created lock of file "Shares/PARENT/parent.txt" of user "Brian" using the WebDAV API
@@ -289,6 +294,7 @@ Feature: unlock locked items
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "textfile.txt" synced
And user "Brian" has locked file "textfile.txt" using file-id path "<dav-path>" setting the following properties
| lockscope | exclusive |
| timeout | Second-3600 |