Skip to content

Commit

Permalink
added test to replace file with empty content
Browse files Browse the repository at this point in the history
  • Loading branch information
PrajwolAmatya committed Jan 2, 2024
1 parent 343ac05 commit 365f9e5
Showing 1 changed file with 83 additions and 5 deletions.
88 changes: 83 additions & 5 deletions tests/acceptance/features/coreApiWebdavUpload1/uploadFile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ Feature: upload file
| dav-path-version |
| spaces |


@issue-7257
Scenario Outline: user updates a file with empty content
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "file with content" to "/textfile.txt"
Expand All @@ -380,7 +380,7 @@ Feature: upload file
| new |
| spaces |


@issue-7257
Scenario Outline: user updates a file inside a folder with empty content
Given using <dav-path-version> DAV path
And user "Alice" has created folder "testFolder"
Expand All @@ -394,7 +394,7 @@ Feature: upload file
| new |
| spaces |

@skipOnReva
@skipOnReva @issue-7257
Scenario Outline: user updates a shared file with empty content
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -410,7 +410,7 @@ Feature: upload file
| new |
| spaces |

@skipOnReva
@skipOnReva @issue-7257
Scenario: user updates a file inside a project space with empty content
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
Expand All @@ -420,7 +420,7 @@ Feature: upload file
Then the HTTP status code should be "204"
And for user "Alice" the content of the file "/textfile.txt" of the space "new-space" should be ""

@skipOnReva
@skipOnReva @issue-7257
Scenario: user updates a file inside a shared space with empty content
Given using spaces DAV path
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -434,3 +434,81 @@ Feature: upload file
Then the HTTP status code should be "204"
And for user "Brian" the content of the file "/textfile.txt" of the space "new-space" should be ""
And for user "Alice" the content of the file "/textfile.txt" of the space "new-space" should be ""

@issue-7275
Scenario Outline: user replaces a file with an empty file
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "file with content" to "/textfile.txt"
When user "Alice" uploads file "filesForUpload/zerobyte.txt" to "/textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "/textfile.txt" for user "Alice" should be ""
Examples:
| dav-path-version |
| old |
| new |
| spaces |

@issue-7257
Scenario Outline: user replaces a file inside a folder with empty file
Given using <dav-path-version> DAV path
And user "Alice" has created folder "testFolder"
And user "Alice" has uploaded file with content "file with content" to "/testFolder/textfile.txt"
When user "Alice" uploads file "filesForUpload/zerobyte.txt" to "testFolder/textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "testFolder/textfile.txt" for user "Alice" should be ""
Examples:
| dav-path-version |
| old |
| new |
| spaces |

@skipOnReva @issue-7257
Scenario Outline: user replaces a shared file with an empty file
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "file with content" to "/textfile.txt"
And user "Alice" has shared file "/textfile.txt" with user "Brian" with permissions "read,update"
When user "Brian" uploads file "filesForUpload/zerobyte.txt" to "Shares/textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Brian" the content of the file "/texftile.txt" of the space "Shares" should be ""
And the content of file "/textfile.txt" for user "Alice" should be ""
Examples:
| dav-path-version |
| old |
| new |

@skipOnReva @issue-7257
Scenario: user replaces a shared file with an empty file using spaces dav path
Given using spaces DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "file with content" to "/textfile.txt"
And user "Alice" has shared file "/textfile.txt" with user "Brian" with permissions "read,update"
When user "Brian" uploads a file "filesForUpload/zerobyte.txt" to "/textfile.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Brian" the content of the file "/textfile.txt" of the space "Shares" should be ""
And the content of file "/textfile.txt" for user "Alice" should be ""

@skipOnReva @issue-7257
Scenario: user replaces a file inside a project space with empty file
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "file with content" to "/textfile.txt"
When user "Alice" uploads a file "filesForUpload/zerobyte.txt" to "/textfile.txt" in space "new-space" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" the content of the file "/textfile.txt" of the space "new-space" should be ""

@skipOnReva @issue-7257
Scenario: user replaces a file inside a shared space with empty file
Given using spaces DAV path
And 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 "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "file with content" to "/textfile.txt"
And user "Alice" has shared a space "new-space" with settings:
| shareWith | Brian |
| role | editor |
When user "Brian" uploads a file "filesForUpload/zerobyte.txt" to "/textfile.txt" in space "new-space" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Brian" the content of the file "/textfile.txt" of the space "new-space" should be ""
And for user "Alice" the content of the file "/textfile.txt" of the space "new-space" should be ""

0 comments on commit 365f9e5

Please sign in to comment.