-
Notifications
You must be signed in to change notification settings - Fork 187
/
uploadToPublicLinkShare.feature
133 lines (115 loc) · 6.61 KB
/
uploadToPublicLinkShare.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
@issue-1276
Feature: upload to a public link share
As a user
I want to create a public link with upload permission
So that the recipient can upload resources
Background:
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
@smokeTest @issue-1267
Scenario: uploading same file to a public upload-only share multiple times via new API
# The new API does the auto rename in upload-only folders
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | create |
| password | %public% |
When the public uploads file "test.txt" with password "%public%" and content "test" using the new public WebDAV API
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
Then the HTTP status code of responses on all endpoints should be "201"
And the following headers should match these regular expressions
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test"
And the content of file "/FOLDER/test (2).txt" for user "Alice" should be "test2"
Scenario Outline: uploading file to a public upload-only share using public API that was deleted does not work
Given using <dav-path-version> DAV path
And user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | create |
| password | %public% |
And user "Alice" has deleted folder "/FOLDER"
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
And the HTTP status code should be "404"
@issue-1268
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |
@issue-1269
Scenario: uploading file to a public read-only share folder with public API does not work
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | read |
| password | %public% |
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
And the HTTP status code should be "403"
Scenario: uploading to a public upload-only share with public API
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | create |
| password | %public% |
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
And the following headers should match these regular expressions
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
Scenario: uploading to a public upload-only share with password with public API
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| password | %public% |
| permissions | create |
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
Scenario: uploading to a public read/write share with password with public API
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| password | %public% |
| permissions | change |
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
@skipOnReva
Scenario: uploading file to a public shared folder with read/write permission when the sharer has insufficient quota does not work with public API
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | change |
| password | %public% |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
Then the HTTP status code should be "507"
@skipOnReva
Scenario: uploading file to a public shared folder with upload-only permission when the sharer has insufficient quota does not work with public API
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | create |
| password | %public% |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
Then the HTTP status code should be "507"
@smokeTest
Scenario: uploading to a public upload-write and no edit and no overwrite share with public API
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | uploadwriteonly |
| password | %public% |
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test2"
@smokeTest @issue-1267
Scenario: uploading same file to a public upload-write and no edit and no overwrite share multiple times with new public API
Given user "Alice" has created a public link share with settings
| path | FOLDER |
| permissions | uploadwriteonly |
| password | %public% |
When the public uploads file "test.txt" with password "%public%" and content "test" using the new public WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test"
And the content of file "/FOLDER/test (2).txt" for user "Alice" should be "test2"