[tests-only][full-ci]adding tests for enable disable sync when sharer is deleted (#9130)
* adding tests for enable disable sync when sharer is deleted * addhressing reviews
This commit is contained in:
@@ -413,3 +413,232 @@ Feature: enable or disable sync of incoming shares
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario: try to enable sync of shared resource from Personal Space when sharer is deleted
|
||||
Given user "Brian" has disabled the auto-sync share
|
||||
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
And the user "Admin" has deleted a user "Alice"
|
||||
When user "Brian" tries to enable share sync of a resource "<<FILEID>>" using the Graph API
|
||||
Then the HTTP status code should be "400"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"innererror",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code" : {
|
||||
"const": "invalidRequest"
|
||||
},
|
||||
"innererror" : {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"request-id"
|
||||
]
|
||||
},
|
||||
"message" : {
|
||||
"const": "converting to drive items failed"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario: try to disable sync of shared resource from Personal Space when sharer is deleted
|
||||
Given user "Brian" has disabled the auto-sync share
|
||||
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
And the user "Admin" has deleted a user "Alice"
|
||||
When user "Brian" tries to disable sync of share "textfile0.txt" using the Graph API
|
||||
Then the HTTP status code should be "400"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"innererror",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code" : {
|
||||
"const": "invalidRequest"
|
||||
},
|
||||
"innererror" : {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"request-id"
|
||||
]
|
||||
},
|
||||
"message" : {
|
||||
"const": "unmounting share failed"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario: enable sync of shared resource from Project Space when sharer is deleted
|
||||
Given user "Brian" has disabled the auto-sync share
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
| space | NewSpace |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
And the user "Admin" has deleted a user "Alice"
|
||||
When user "Brian" enables share sync of a resource "<<FILEID>>" using the Graph API
|
||||
Then the HTTP status code should be "201"
|
||||
And user "Brian" should have sync enabled for share "textfile0.txt"
|
||||
|
||||
|
||||
Scenario: disable sync of shared resource from Project Space when sharer is deleted
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
|
||||
And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "/textfile0.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
| space | NewSpace |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
And the user "Admin" has deleted a user "Alice"
|
||||
When user "Brian" disables sync of share "textfile0.txt" using the Graph API
|
||||
Then the HTTP status code should be "204"
|
||||
And user "Brian" should have sync disabled for share "textfile0.txt"
|
||||
|
||||
|
||||
Scenario: try to enable sync of group shared resource when sharer is deleted
|
||||
Given user "Brian" has disabled the auto-sync share
|
||||
And group "grp1" has been created
|
||||
And user "Alice" has been added to group "grp1"
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| sharee | grp1 |
|
||||
| shareType | group |
|
||||
| permissionsRole | Viewer |
|
||||
And group "grp1" has been deleted
|
||||
When user "Brian" tries to enable share sync of a resource "<<FILEID>>" using the Graph API
|
||||
Then the HTTP status code should be "400"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"innererror",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code" : {
|
||||
"const": "invalidRequest"
|
||||
},
|
||||
"innererror" : {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"request-id"
|
||||
]
|
||||
},
|
||||
"message" : {
|
||||
"const": "mounting share failed"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario: try to disable sync of group shared resource when sharer is deleted
|
||||
Given user "Brian" has disabled the auto-sync share
|
||||
And group "grp1" has been created
|
||||
And user "Alice" has been added to group "grp1"
|
||||
And user "Brian" has been added to group "grp1"
|
||||
And user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| sharee | grp1 |
|
||||
| shareType | group |
|
||||
| permissionsRole | Viewer |
|
||||
And group "grp1" has been deleted
|
||||
When user "Brian" tries to disable sync of share "textfile0.txt" using the Graph API
|
||||
Then the HTTP status code should be "400"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"innererror",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code" : {
|
||||
"const": "invalidRequest"
|
||||
},
|
||||
"innererror" : {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"request-id"
|
||||
]
|
||||
},
|
||||
"message" : {
|
||||
"const": "unmounting share failed"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user