Skip to content

Commit

Permalink
Merge pull request #39778 from SagarGi/apiShareOperationsToShare1
Browse files Browse the repository at this point in the history
[tests-only][full-ci] Add spaces example for apiShareOperationsToShare1 suite
  • Loading branch information
phil-davis authored Feb 10, 2022
2 parents 9780800 + 09356ed commit 18d94e1
Showing 1 changed file with 69 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: sharing

@smokeTest
Scenario Outline: moving a file into a share as recipient
Given using <dav-path-version> DAV path
Given using <dav_version> DAV path
And user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
Expand All @@ -20,13 +20,18 @@ Feature: sharing
Then as "Brian" file "/Shares/shared/shared_file.txt" should exist
And as "Alice" file "/shared/shared_file.txt" should exist
Examples:
| dav-path-version |
| old |
| new |
| dav_version |
| old |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |

@smokeTest @files_trashbin-app-required @notToImplementOnOCIS
Scenario Outline: moving a file out of a share as recipient creates a backup for the owner
Given using <dav-path-version> DAV path
Given using <dav_version> DAV path
And user "Alice" has created folder "/shared"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
Expand All @@ -38,13 +43,13 @@ Feature: sharing
And as "Alice" file "/shared/shared_file.txt" should not exist
And as "Alice" file "/shared_file.txt" should exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| dav_version |
| old |
| new |

@files_trashbin-app-required @notToImplementOnOCIS
Scenario Outline: moving a folder out of a share as recipient creates a backup for the owner
Given using <dav-path-version> DAV path
Given using <dav_version> DAV path
And user "Alice" has created folder "/shared"
And user "Alice" has created folder "/shared/sub"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
Expand All @@ -58,13 +63,14 @@ Feature: sharing
And as "Alice" folder "/sub" should exist in the trashbin
And as "Alice" file "/sub/shared_file.txt" should exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| dav_version |
| old |
| new |


Scenario: Move files between shares by same user
Given user "Alice" has created folder "share1"
Scenario Outline: Move files between shares by same user
Given using <dav_version> DAV path
And user "Alice" has created folder "share1"
And user "Alice" has created folder "share2"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has moved file "textfile0.txt" to "share1/textfile0.txt"
Expand All @@ -73,14 +79,25 @@ Feature: sharing
And user "Brian" has accepted share "/share1" offered by user "Alice"
And user "Brian" has accepted share "/share2" offered by user "Alice"
When user "Brian" moves file "/Shares/share1/textfile0.txt" to "/Shares/share2/textfile0.txt" using the WebDAV API
Then as "Brian" file "/Shares/share1/textfile0.txt" should not exist
Then the HTTP status code should be "201"
And as "Brian" file "/Shares/share1/textfile0.txt" should not exist
But as "Brian" file "/Shares/share2/textfile0.txt" should exist
And as "Alice" file "share1/textfile0.txt" should not exist
But as "Alice" file "share2/textfile0.txt" should exist
Examples:
| dav_version |
| old |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |

Scenario: Move files between shares by same user added by sharee
Given user "Alice" has created folder "share1"

Scenario Outline: Move files between shares by same user added by sharee
Given using <dav_version> DAV path
And user "Alice" has created folder "share1"
And user "Alice" has created folder "share2"
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared folder "/share1" with user "Brian"
Expand All @@ -93,10 +110,20 @@ Feature: sharing
When user "Brian" moves file "/Shares/share1/shared_file.txt" to "/Shares/share2/shared_file.txt" using the WebDAV API
Then as "Brian" file "/Shares/share2/shared_file.txt" should exist
And as "Alice" file "share2/shared_file.txt" should exist
Examples:
| dav_version |
| old |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |


Scenario: Move files between shares by different users
Given user "Carol" has been created with default attributes and without skeleton files
Scenario Outline: Move files between shares by different users
Given using <dav_version> DAV path
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"
And user "Brian" has created folder "/PARENT"
Expand All @@ -106,17 +133,37 @@ Feature: sharing
And user "Carol" has accepted share "/PARENT" offered by user "Alice"
And user "Carol" has accepted share "/PARENT" offered by user "Brian"
When user "Carol" moves file "/Shares/PARENT/shared_file.txt" to "/Shares/PARENT (2)/shared_file.txt" using the WebDAV API
Then as "Carol" file "/Shares/PARENT (2)/shared_file.txt" should exist
Then the HTTP status code should be "201"
And as "Carol" file "/Shares/PARENT (2)/shared_file.txt" should exist
And as "Brian" file "PARENT/shared_file.txt" should exist
But as "Alice" file "PARENT/shared_file.txt" should not exist
Examples:
| dav_version |
| old |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |


Scenario: overwrite a received file share
Given user "Alice" has uploaded file with content "this is the old content" to "/textfile1.txt"
Scenario Outline: overwrite a received file share
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "this is the old content" to "/textfile1.txt"
And user "Alice" has shared file "/textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" uploads file with content "this is a new content" to "/Shares/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" file "Shares/textfile1.txt" should exist
And the content of file "Shares/textfile1.txt" for user "Brian" should be "this is a new content"
And the content of file "textfile1.txt" for user "Alice" should be "this is a new content"
Examples:
| dav_version |
| old |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |

0 comments on commit 18d94e1

Please sign in to comment.