Files

95 lines
4.5 KiB
Gherkin
Raw Permalink Normal View History

@skipOnReva
2023-01-02 17:26:54 +05:45
Feature: upload file
As a user
I want the mtime of an uploaded file to be the creation date on upload source not the upload date
So that I can find files by their real creation date
Background:
Given these users have been created with default attributes:
2023-01-02 17:26:54 +05:45
| username |
| Alice |
| Brian |
2023-01-02 17:26:54 +05:45
Scenario Outline: upload file with mtime to a received share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/toShare"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Brian" has a share "toShare" synced
2023-01-02 17:26:54 +05:45
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the mtime of the file "/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
2023-01-02 17:26:54 +05:45
And as "Brian" the mtime of the file "/Shares/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2023-01-02 17:26:54 +05:45
2023-01-02 17:26:54 +05:45
Scenario Outline: upload file with mtime to a send share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/toShare"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Brian" has a share "toShare" synced
2023-01-02 17:26:54 +05:45
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the mtime of the file "/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
2023-01-02 17:26:54 +05:45
And as "Brian" the mtime of the file "/Shares/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-01-02 17:26:54 +05:45
Scenario Outline: overwriting a file with mtime in a received share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/toShare"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Brian" has a share "toShare" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has uploaded file with content "uploaded content" to "/toShare/file.txt"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the mtime of the file "/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
2023-01-02 17:26:54 +05:45
And as "Brian" the mtime of the file "/Shares/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2023-01-02 17:26:54 +05:45
2023-01-02 17:26:54 +05:45
Scenario Outline: overwriting a file with mtime in a send share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/toShare"
And user "Alice" has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Brian" has a share "toShare" synced
2023-01-02 17:26:54 +05:45
And user "Brian" has uploaded file with content "uploaded content" to "/Shares/toShare/file.txt"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the mtime of the file "/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
2023-01-02 17:26:54 +05:45
And as "Brian" the mtime of the file "/Shares/toShare/file.txt" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |