mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-11-27 10:34:42 -05:00
Shares are synced (auto-accepted) asynchronously by the sharing service, so the scenarios waited for it with "user ... has a share ... synced" after each share. Where they didn't, the following steps could race with it, e.g. a hide sent before the auto-accept was overwritten by it. The Given steps that create user and group shares now wait until the share is synced for each user it was sent to (the members of a group), unless the user has auto-sync turned off. The "has a share ... synced" steps that only followed such a Given step are removed, and the line references of the expected failures are updated. Assisted-by: Claude Code:claude-opus-5-5
55 lines
2.5 KiB
Gherkin
55 lines
2.5 KiB
Gherkin
Feature: file versions of a shared resource
|
|
As a user
|
|
I want to access versions of a resource shared with me
|
|
So that I can view and manage its history according to my role
|
|
|
|
# These scenarios address the shared file the same way a web client does: by the
|
|
# Shares-mount id resolved from the sharee's shared-with-me list (not by the owner's
|
|
# storage resource id), so that regressions of the sharee code path are caught.
|
|
|
|
Background:
|
|
Given these users have been created with default attributes:
|
|
| username |
|
|
| Alice |
|
|
| Brian |
|
|
And user "Alice" has uploaded file with content "hello world version 1" to "text.txt"
|
|
And user "Alice" has uploaded file with content "hello world version 1.1" to "text.txt"
|
|
|
|
@env-config
|
|
Scenario Outline: sharee can view file versions of a shared file while upload and restore depend on the role
|
|
Given the administrator has enabled the permissions role "<role>"
|
|
And user "Alice" has sent the following resource share invitation:
|
|
| resource | text.txt |
|
|
| space | Personal |
|
|
| sharee | Brian |
|
|
| shareType | user |
|
|
| permissionsRole | <role> |
|
|
When user "Brian" gets the number of versions of shared resource "text.txt"
|
|
Then the HTTP status code should be "207"
|
|
And the number of versions should be "1"
|
|
When user "Brian" uploads file with content "shared file new version" to "/Shares/text.txt" using the WebDAV API
|
|
Then the HTTP status code should be "<upload-code>"
|
|
Examples:
|
|
| role | upload-code |
|
|
| Viewer With Versions | 403 |
|
|
| File Editor With Versions | 204 |
|
|
|
|
@env-config @issue-3168
|
|
Scenario Outline: sharee tries to restore file version
|
|
Given the administrator has enabled the permissions role "<role>"
|
|
And user "Alice" has sent the following resource share invitation:
|
|
| resource | text.txt |
|
|
| space | Personal |
|
|
| sharee | Brian |
|
|
| shareType | user |
|
|
| permissionsRole | <role> |
|
|
When user "Brian" gets the number of versions of shared resource "text.txt"
|
|
Then the HTTP status code should be "207"
|
|
And the number of versions should be "1"
|
|
When user "Brian" restores version index "1" of shared resource "text.txt"
|
|
Then the HTTP status code should be "<restore-code>"
|
|
Examples:
|
|
| role | restore-code |
|
|
| Viewer With Versions | 403 |
|
|
| File Editor With Versions | 204 |
|