Files
opencloud/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareGroupAndUserWithSameName.feature
Sabin Panta 47eb710523 [tests-only][full-ci] refactoring user creation Given steps from provisioning into GraphContext (#7019) (#7259)
* refactored the user creation given statement from provisioning to graph api

added getUser steps that covers the steps for user with user light role

* added userlight step tests to check drive information and updated expected failure files

* added usercreation initiation code

* deleted seperate tests for user light role

* remove unnecesary changes

* add user not initialize step

* corrected the testcode

* moved the steps from graph to provisioning file

* fix creating single ldap user

* fix: user check method

* initialize user via graph

* addressing reviews

---------

Co-authored-by: Saw-jan <saw.jan.grg3e@gmail.com>
2023-09-11 15:02:06 +05:45

96 lines
5.3 KiB
Gherkin

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 and without skeleton files
Scenario: creating a new share with user and a group having same name
Given these users have been created with default attributes and without skeleton files:
| 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 shared file "randomfile.txt" with group "Brian"
And user "Carol" has accepted share "/randomfile.txt" offered by user "Alice"
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
And user "Brian" accepts share "/randomfile.txt" offered by user "Alice" using the sharing API
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
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 and without skeleton files:
| 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 shared file "randomfile.txt" with user "Brian"
And user "Brian" has accepted share "/randomfile.txt" offered by user "Alice"
When user "Alice" shares file "randomfile.txt" with group "Brian" using the sharing API
And user "Carol" accepts share "/randomfile.txt" offered by user "Alice" using the sharing API
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
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 and without skeleton files:
| 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 shared file "randomfile.txt" with group "brian"
And user "Carol" has accepted share "/randomfile.txt" offered by user "Alice"
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
And user "Brian" accepts share "/randomfile.txt" offered by user "Alice" using the sharing API
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
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 and without skeleton files:
| 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 shared file "randomfile.txt" with user "Brian"
And user "Brian" has accepted share "/randomfile.txt" offered by user "Alice"
When user "Alice" shares file "randomfile.txt" with group "brian" using the sharing API
And user "Carol" accepts share "/randomfile.txt" offered by user "Alice" using the sharing API
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
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"