Files

188 lines
5.9 KiB
Gherkin
Raw Permalink Normal View History

2023-01-02 17:26:54 +05:45
Feature: default capabilities for normal user
As a user
I want to list capabilities
So that I can make sure what capabilities are available to me
2023-01-02 17:26:54 +05:45
Background:
Given using OCS API version "1"
And user "Alice" has been created with default attributes
2023-01-02 17:26:54 +05:45
# adjust this scenario after fixing tagged issues as its just created to show difference
# in the response items in different environment (core & ocis-reva)
@issue-1285 @issue-1286
2023-01-02 17:26:54 +05:45
Scenario: getting default capabilities with normal user
When user "Alice" retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
2023-03-15 10:06:58 +05:45
And the ocs JSON data of the response should match
2024-06-10 11:49:27 +05:45
"""
{
"type": "object",
"required": [ "capabilities" ],
2024-06-10 11:49:27 +05:45
"properties": {
"capabilities": {
"type": "object",
"required": [
"core",
"files",
"files_sharing"
],
"properties": {
"core": {
"type": "object",
"required": [
"pollinterval",
"webdav-root",
"status"
],
"properties": {
"pollinterval": {
"const": 60
2024-06-10 11:49:27 +05:45
},
"webdav-root": {
2025-09-24 10:32:37 +02:00
"const": "webdav"
2024-06-10 11:49:27 +05:45
},
"status": {
"type": "object",
"required": [
"version",
"versionstring",
"edition",
"productname"
],
"properties": {
"version": {
"const": "%version%"
2024-06-10 11:49:27 +05:45
},
"versionstring": {
"const": "%versionstring%"
2024-06-10 11:49:27 +05:45
},
"edition": {
"const": "%edition%"
2024-06-10 11:49:27 +05:45
},
"productname": {
"const": "%productname%"
2024-06-10 11:49:27 +05:45
}
}
}
}
2024-06-10 11:49:27 +05:45
},
"files": {
"type": "object",
"required": [
"bigfilechunking",
"privateLinks"
2024-06-10 11:49:27 +05:45
],
"properties": {
"bigfilechunking": {
"const": false
2024-06-10 11:49:27 +05:45
},
"privateLinks": {
"const": true
2024-06-10 11:49:27 +05:45
}
}
2024-06-10 11:49:27 +05:45
},
"files_sharing": {
"type": "object",
"required": [
"api_enabled",
"default_permissions",
"public",
"resharing",
"federation",
"group_sharing",
"share_with_group_members_only",
"share_with_membership_groups_only",
"auto_accept_share",
"user_enumeration"
],
"properties": {
"api_enabled": {
"const": true
2024-06-10 11:49:27 +05:45
},
"default_permissions": {
"const": 22
2024-06-10 11:49:27 +05:45
},
"public": {
"type": "object",
"required": [
"enabled",
"multiple",
"upload",
"supports_upload_only",
"send_mail",
"social_share"
2024-06-10 11:49:27 +05:45
],
"properties": {
"enabled": {
"const": true
2024-06-10 11:49:27 +05:45
},
"multiple": {
"const": true
2024-06-10 11:49:27 +05:45
},
"upload": {
"const": true
2024-06-10 11:49:27 +05:45
},
"supports_upload_only": {
"const": true
2024-06-10 11:49:27 +05:45
},
"send_mail": {
"const": true
2024-06-10 11:49:27 +05:45
},
"social_share": {
"const": true
2024-06-10 11:49:27 +05:45
}
}
2024-06-10 11:49:27 +05:45
},
"resharing": {
"const": false
2024-06-10 11:49:27 +05:45
},
"federation": {
"type": "object",
"required": [
"outgoing",
"incoming"
],
"properties": {
"outgoing": {
"const": false
2024-06-10 11:49:27 +05:45
},
"incoming": {
"const": false
2024-06-10 11:49:27 +05:45
}
}
2024-06-10 11:49:27 +05:45
},
"group_sharing": {
"const": true
2024-06-10 11:49:27 +05:45
},
"share_with_group_members_only": {
"const": true
2024-06-10 11:49:27 +05:45
},
"share_with_membership_groups_only": {
"const": true
2024-06-10 11:49:27 +05:45
},
"auto_accept_share": {
"const": true
2024-06-10 11:49:27 +05:45
},
"user_enumeration": {
"type": "object",
"required": [
"enabled",
"group_members_only"
],
"properties": {
"enabled": {
"const": true
2024-06-10 11:49:27 +05:45
},
"group_members_only": {
"const": true
2024-06-10 11:49:27 +05:45
}
}
}
}
}
}
}
}
}
2024-06-10 11:49:27 +05:45
"""