mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-12-05 14:23:50 -05:00
* test: wait for the share sync in the Given steps that create shares 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 * test: don't wait for the sync of a share with the role Denied A share with the role Denied gives no access, so it never shows up in the shared-with-me list of the sharee, and the wait for its sync timed out. Assisted-by: Claude Code:claude-opus-5-5
109 lines
5.0 KiB
Gherkin
109 lines
5.0 KiB
Gherkin
@skipOnReva
|
|
Feature: sharing works when a username and group name are the same
|
|
As a user
|
|
I want to share resources with group and users having same name
|
|
So that I can make sure that the sharing works
|
|
|
|
Background:
|
|
Given user "Alice" has been created with default attributes
|
|
|
|
|
|
Scenario: creating a new share with user and a group having same name
|
|
Given these users have been created with default attributes:
|
|
| username |
|
|
| Brian |
|
|
| Carol |
|
|
And group "Brian" has been created
|
|
And user "Carol" has been added to group "Brian"
|
|
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
|
|
And user "Alice" has sent the following resource share invitation:
|
|
| resource | randomfile.txt |
|
|
| space | Personal |
|
|
| sharee | Brian |
|
|
| shareType | group |
|
|
| permissionsRole | File Editor |
|
|
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
|
|
Then the HTTP status code should be "200"
|
|
And the OCS status code should be "100"
|
|
And user "Brian" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And user "Carol" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And the content of file "/Shares/randomfile.txt" for user "Brian" should be "Random data"
|
|
And the content of file "/Shares/randomfile.txt" for user "Carol" should be "Random data"
|
|
|
|
|
|
Scenario: creating a new share with group and a user having same name
|
|
Given these users have been created with default attributes:
|
|
| username |
|
|
| Brian |
|
|
| Carol |
|
|
And group "Brian" has been created
|
|
And user "Carol" has been added to group "Brian"
|
|
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
|
|
And user "Alice" has sent the following resource share invitation:
|
|
| resource | randomfile.txt |
|
|
| space | Personal |
|
|
| sharee | Brian |
|
|
| shareType | user |
|
|
| permissionsRole | File Editor |
|
|
When user "Alice" shares file "randomfile.txt" with group "Brian" using the sharing API
|
|
Then the HTTP status code should be "200"
|
|
And the OCS status code should be "100"
|
|
And user "Brian" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And user "Carol" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And the content of file "/Shares/randomfile.txt" for user "Brian" should be "Random data"
|
|
And the content of file "/Shares/randomfile.txt" for user "Carol" should be "Random data"
|
|
|
|
|
|
Scenario: creating a new share with user and a group having same name but different case
|
|
Given these users have been created with default attributes:
|
|
| username |
|
|
| Brian |
|
|
| Carol |
|
|
And group "brian" has been created
|
|
And user "Carol" has been added to group "brian"
|
|
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
|
|
And user "Alice" has sent the following resource share invitation:
|
|
| resource | randomfile.txt |
|
|
| space | Personal |
|
|
| sharee | brian |
|
|
| shareType | group |
|
|
| permissionsRole | File Editor |
|
|
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
|
|
Then the HTTP status code should be "200"
|
|
And the OCS status code should be "100"
|
|
And user "Brian" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And user "Carol" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And the content of file "/Shares/randomfile.txt" for user "Brian" should be "Random data"
|
|
And the content of file "/Shares/randomfile.txt" for user "Carol" should be "Random data"
|
|
|
|
|
|
Scenario: creating a new share with group and a user having same name but different case
|
|
Given these users have been created with default attributes:
|
|
| username |
|
|
| Brian |
|
|
| Carol |
|
|
And group "brian" has been created
|
|
And user "Carol" has been added to group "brian"
|
|
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
|
|
And user "Alice" has sent the following resource share invitation:
|
|
| resource | randomfile.txt |
|
|
| space | Personal |
|
|
| sharee | Brian |
|
|
| shareType | user |
|
|
| permissionsRole | File Editor |
|
|
When user "Alice" shares file "randomfile.txt" with group "brian" using the sharing API
|
|
Then the HTTP status code should be "200"
|
|
And the OCS status code should be "100"
|
|
And user "Carol" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And user "Brian" should see the following elements
|
|
| /Shares/randomfile.txt |
|
|
And the content of file "/Shares/randomfile.txt" for user "Carol" should be "Random data"
|
|
And the content of file "/Shares/randomfile.txt" for user "Brian" should be "Random data"
|