[full-ci] ApiTests. enable auto accepting in api tests (#7477)

* enable auto accepting in test

* go format
This commit is contained in:
Viktor Scharf
2023-10-17 16:29:05 +02:00
committed by GitHub
parent 917ee878cb
commit c179485db6
95 changed files with 458 additions and 1063 deletions
@@ -14,7 +14,6 @@ Feature: sharing
Scenario Outline: sharee can see the share
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -30,8 +29,6 @@ Feature: sharing
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has shared file "textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him that are received as file "/Shares/textfile1.txt" using the provisioning API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -47,8 +44,6 @@ Feature: sharing
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has shared file "textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him that are received as file "/Shares/textfile0.txt" using the provisioning API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -64,7 +59,6 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has shared file "textfile0.txt" with group "grp1"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -15,7 +15,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt"
When user "Brian" moves file "textfile0.txt" to "/Shares/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "201"
@@ -35,8 +34,6 @@ Feature: sharing
And user "Alice" has moved file "textfile0.txt" to "share1/textfile0.txt"
And user "Alice" has shared folder "/share1" with user "Brian"
And user "Alice" has shared folder "/share2" with user "Brian"
And user "Brian" has accepted share "/share1" offered by user "Alice"
And user "Brian" has accepted share "/share2" offered by user "Alice"
When user "Brian" moves file "/Shares/share1/textfile0.txt" to "/Shares/share2/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/Shares/share1/textfile0.txt" should not exist
@@ -56,8 +53,6 @@ Feature: sharing
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared folder "/share1" with user "Brian"
And user "Alice" has shared folder "/share2" with user "Brian"
And user "Brian" has accepted share "/share1" offered by user "Alice"
And user "Brian" has accepted share "/share2" offered by user "Alice"
When user "Brian" moves file "textfile0.txt" to "/Shares/share1/shared_file.txt" using the WebDAV API
And user "Brian" moves file "/Shares/share1/shared_file.txt" to "/Shares/share2/shared_file.txt" using the WebDAV API
Then the HTTP status code of responses on all endpoints should be "201"
@@ -80,8 +75,6 @@ Feature: sharing
And user "Alice" has moved file "textfile0.txt" to "PARENT/shared_file.txt"
And user "Alice" has shared folder "/PARENT" with user "Carol"
And user "Brian" has shared folder "/PARENT" with user "Carol"
And user "Carol" has accepted share "/PARENT" offered by user "Alice"
And user "Carol" has accepted share "/PARENT" offered by user "Brian"
When user "Carol" moves file "/Shares/PARENT/shared_file.txt" to "/Shares/PARENT (2)/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Carol" file "/Shares/PARENT (2)/shared_file.txt" should exist
@@ -97,7 +90,6 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "this is the old content" to "/textfile1.txt"
And user "Alice" has shared file "/textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" uploads file with content "this is a new content" to "/Shares/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" file "Shares/textfile1.txt" should exist
@@ -14,7 +14,6 @@ Feature: sharing
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/file_to_share.txt"
And user "Alice" has shared file "file_to_share.txt" with user "Brian"
And user "Brian" has accepted share "/file_to_share.txt" offered by user "Alice"
When user "Alice" gets all shares shared by her using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -29,7 +28,6 @@ Feature: sharing
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When the administrator gets all shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -49,8 +47,6 @@ Feature: sharing
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has shared file "textfile0.txt" with user "Carol"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Carol" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Alice" gets all the shares of the file "textfile0.txt" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -71,9 +67,7 @@ Feature: sharing
| David |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has shared file "/Shares/textfile0.txt" with user "Carol"
And user "Carol" has accepted share "/textfile0.txt" offered by user "Brian"
When user "Alice" gets all the shares with reshares of the file "textfile0.txt" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -94,7 +88,6 @@ Feature: sharing
And user "Carol" has created folder "/shared"
And user "Carol" has uploaded file with content "some data" to "/shared/shared_file.txt"
And user "Carol" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Carol"
And user "Brian" has shared folder "/Shares/shared" with group "grp1"
# no need to accept this share as it is Carol's file
When user "Carol" gets all the shares shared with her using the sharing API
@@ -111,7 +104,6 @@ Feature: sharing
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/file_to_share.txt"
And user "Alice" has shared file "file_to_share.txt" with user "Brian"
And user "Brian" has accepted share "/file_to_share.txt" offered by user "Alice"
When user "Alice" gets the info of the last share using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -161,8 +153,6 @@ Feature: sharing
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has shared folder "/PARENT" with group "group0"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
And user "Carol" has accepted share "/PARENT" offered by user "Alice"
When the administrator removes user "Carol" from group "group0" using the provisioning API
Then the HTTP status code should be "200"
And user "Brian" should see the following elements
@@ -178,7 +168,6 @@ Feature: sharing
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has shared file "PARENT/parent.txt" with user "Brian"
And user "Brian" has accepted share "/parent.txt" offered by user "Alice"
When user "Alice" gets all the shares inside the folder "PARENT" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
@@ -9,6 +9,7 @@ Feature: get the pending shares filtered by type (user, group etc)
| Alice |
| Brian |
And group "grp1" has been created
And user "Brian" has disabled auto-accepting
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/folderToShareWithUser"
And user "Alice" has created folder "/folderToShareWithGroup"
@@ -22,9 +23,7 @@ Feature: get the pending shares filtered by type (user, group etc)
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -17,16 +17,12 @@ Feature: get the received shares filtered by type (user, group etc)
And user "Alice" has uploaded file with content "file to share with group" to "/fileToShareWithGroup.txt"
And user "Alice" has uploaded file with content "file to share with public" to "/fileToShareWithPublic.txt"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -21,12 +21,10 @@ Feature: get the received shares filtered by type (user, group etc)
Scenario Outline: getting shares received from users when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -43,12 +41,10 @@ Feature: get the received shares filtered by type (user, group etc)
Scenario Outline: getting shares received from groups when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -68,16 +64,12 @@ Feature: get the received shares filtered by type (user, group etc)
# that are "shared with me" should always return an empty list.
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -17,16 +17,12 @@ Feature: get shares filtered by type (user, group etc)
And user "Alice" has uploaded file with content "file to share with group" to "/fileToShareWithGroup.txt"
And user "Alice" has uploaded file with content "file to share with public" to "/fileToShareWithPublic.txt"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -21,12 +21,10 @@ Feature: get shares filtered by type (user, group etc)
Scenario Outline: getting shares shared to users when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -43,12 +41,10 @@ Feature: get shares filtered by type (user, group etc)
Scenario Outline: getting shares shared to groups when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
@@ -65,13 +61,9 @@ Feature: get shares filtered by type (user, group etc)
Scenario Outline: getting shares shared to public links when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
When user "Alice" gets the public link shares shared by her using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"