Use sharingNG for sharing in given step, refactored accordingly

This commit is contained in:
Prarup Gurung
2024-05-02 14:30:01 +05:45
parent db281c4257
commit 7423fa3a4b
5 changed files with 56 additions and 53 deletions

View File

@@ -60,9 +60,11 @@ Feature: enforce password on public link
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
And user "Alice" has created a public link share with settings
| path | /testfile.txt |
| permissions | 1 |
And using SharingNG
And user "Alice" has created the following link share:
| resource | testfile.txt |
| space | Personal |
| permissionsRole | view |
When user "Alice" updates the last public link share using the sharing API with
| permissions | 3 |
| password | %public% |
@@ -150,9 +152,11 @@ Feature: enforce password on public link
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
And user "Alice" has created a public link share with settings
| path | /testfile.txt |
| permissions | 1 |
And using SharingNG
And user "Alice" has created the following link share:
| resource | testfile.txt |
| space | Personal |
| permissionsRole | view |
When user "Alice" updates the last public link share using the sharing API with
| permissions | 3 |
| password | 6a0Q;A3 +i^m[ |
@@ -181,9 +185,11 @@ Feature: enforce password on public link
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And using OCS API version "<ocs-api-version>"
And user "Alice" has created a public link share with settings
| path | /testfile.txt |
| permissions | 1 |
And using SharingNG
And user "Alice" has created the following link share:
| resource | testfile.txt |
| space | Personal |
| permissionsRole | view |
When user "Alice" updates the last public link share using the sharing API with
| permissions | 3 |
| password | Pws^ |
@@ -254,9 +260,11 @@ Feature: enforce password on public link
And using OCS API version "2"
And user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "/testfile.txt"
And user "Alice" has created a public link share with settings
| path | /testfile.txt |
| permissions | 0 |
And using SharingNG
And user "Alice" has created the following link share:
| resource | testfile.txt |
| space | Personal |
| permissionsRole | internal |
When user "Alice" updates the last public link share using the sharing API with
| permissions | 3 |
| password | <password> |

View File

@@ -586,7 +586,12 @@ Feature: user GDPR (General Data Protection Regulation) report
Scenario: generate a GDPR report and check events when a user shares a folder
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/folderMain"
And user "Alice" has shared entry "/folderMain" with user "Brian"
And user "Alice" has sent the following share invitation:
| resource | folderMain |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API
And user "Alice" downloads the content of GDPR report ".personal_data_export.json"
Then the HTTP status code of responses on each endpoint should be "202, 200" respectively
@@ -709,10 +714,12 @@ Feature: user GDPR (General Data Protection Regulation) report
Scenario: generate a GDPR report and check events when a user creates a public link share
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/folderMain"
And user "Alice" has created a public link share with settings
| path | /folderMain |
| name | sharedlink |
| password | %public% |
And user "Alice" has created the following link share:
| resource | folderMain |
| space | Personal |
| permissionsRole | view |
| password | %public% |
| displayName | sharedlink |
When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API
And user "Alice" downloads the content of GDPR report ".personal_data_export.json"
Then the HTTP status code of responses on each endpoint should be "202, 200" respectively
@@ -854,9 +861,11 @@ Feature: user GDPR (General Data Protection Regulation) report
Given user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "GDPR Space" with the default quota using the Graph API
And user "Alice" has shared a space "GDPR Space" with settings:
| shareWith | Brian |
| role | viewer |
And user "Alice" has sent the following share invitation:
| space | GDPR Space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API
And user "Alice" downloads the content of GDPR report ".personal_data_export.json"
Then the HTTP status code of responses on each endpoint should be "202, 200" respectively
@@ -864,9 +873,7 @@ Feature: user GDPR (General Data Protection Regulation) report
"""
{
"type": "object",
"required": [
"event"
],
"required": ["event", "type"],
"properties": {
"event": {
"type": "object",
@@ -879,11 +886,7 @@ Feature: user GDPR (General Data Protection Regulation) report
"properties": {
"Creator": {
"type": "object",
"required": [
"idp",
"opaque_id",
"type"
],
"required": ["idp", "opaque_id", "type"],
"properties": {
"idp": {
"type": "string",
@@ -895,17 +898,13 @@ Feature: user GDPR (General Data Protection Regulation) report
},
"type": {
"type": "number",
"enum": [1]
"const": 1
}
}
},
"Executant": {
"type": "object",
"required": [
"idp",
"opaque_id",
"type"
],
"required": ["idp", "opaque_id", "type"],
"properties": {
"idp": {
"type": "string",
@@ -917,37 +916,29 @@ Feature: user GDPR (General Data Protection Regulation) report
},
"type": {
"type": "number",
"enum": [1]
"const": 1
}
}
},
"GranteeGroupID": {
"type": ["number", "null"],
"enum": [null]
"const": null
},
"GranteeUserID": {
"type": "object",
"required": [
"idp",
"opaque_id",
"type"
],
"required": ["opaque_id"],
"properties": {
"idp": {
"type": "string",
"pattern": "^%base_url%$"
},
"opaque_id": {
"type": "string",
"pattern": "^%user_id_pattern%$"
},
"type": {
"type": "number",
"enum": [1]
}
}
}
}
},
"type": {
"type": "string",
"const": "events.SpaceShared"
}
}
}