Skip to content

Commit

Permalink
[tests-only][full-ci] Added API tests to check file versions of a fil…
Browse files Browse the repository at this point in the history
…e inside a shared space (owncloud#7969)

* adding test for file version of a share in a projectspace

* adding test for listing file version of a file inside project space
  • Loading branch information
nirajacharya2 authored and 2403905 committed Jan 24, 2024
1 parent 1546749 commit e39319d
Showing 1 changed file with 33 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Feature: checking file versions using file id
I want to share file outside of the space
So that other users can access the file


Scenario Outline: check the file versions of a shared file
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
Expand All @@ -15,7 +14,10 @@ Feature: checking file versions using file id
And user "Alice" has uploaded a file inside space "Project1" with content "hello world version 1" to "text.txt"
And we save it into "FILEID"
And user "Alice" has uploaded a file inside space "Project1" with content "hello world version 1.1" to "text.txt"
And user "Alice" has created a share inside of space "Project1" with settings:


Scenario Outline: check the file versions of a file shared from project space
Given user "Alice" has created a share inside of space "Project1" with settings:
| path | text.txt |
| shareWith | Brian |
| role | <role> |
Expand All @@ -26,7 +28,33 @@ Feature: checking file versions using file id
When user "Brian" tries to get the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
Then the HTTP status code should be "403"
Examples:
| role |
| editor |
| role |
| editor |
| viewer |
| all |


Scenario Outline: check the versions of a file in a shared space as editor/manager
Given user "Alice" has shared a space "Project1" with settings:
| shareWith | Brian |
| role | <role> |
And using new DAV path
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"
When user "Brian" 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"
Examples:
| role |
| editor |
| manager |


Scenario: check the versions of a file in a shared space as viewer
Given user "Alice" has shared a space "Project1" with settings:
| shareWith | Brian |
| role | viewer |
And using new DAV path
When user "Brian" tries to get the number of versions of file "/text.txt" using file-id path "/meta/<<FILEID>>/v"
Then the HTTP status code should be "403"

0 comments on commit e39319d

Please sign in to comment.