Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] Added API test coverage for checking file versions after multiple restores #8188

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tests/acceptance/features/coreApiVersions/fileVersions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,31 @@ Feature: dav-versions
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
Then the HTTP status code should be "403"
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\Forbidden"

@issue-enterprise-6249
Scenario: upload empty content file and check versions after multiple restores
Given user "Alice" has uploaded file with content "" to "textfile.txt"
And user "Alice" has uploaded file with content "test content" to "textfile.txt"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" element
When user "Alice" restores version index "1" of file "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 ""
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements
When user "Alice" restores version index "1" of file "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 "test content"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements


Scenario: update with empty content and check versions after multiple restores
Given user "Alice" has uploaded file with content "test content" to "textfile.txt"
And user "Alice" has uploaded file with content "" to "textfile.txt"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" element
When user "Alice" restores version index "1" of file "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 "test content"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements
When user "Alice" restores version index "1" of file "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 ""
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements