Skip to content

Commit

Permalink
Added spaces tests for apiWebdavMove1 suite
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Feb 4, 2022
1 parent cf7d8c3 commit bcd2c3e
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 5 deletions.
48 changes: 45 additions & 3 deletions tests/acceptance/features/apiWebdavMove1/moveFolder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: move (rename) folder
Given using OCS API version "1"
And user "Alice" has been created with default attributes and without skeleton files

@issue-ocis-reva-211

Scenario Outline: Renaming a folder to a backslash should return an error
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -21,7 +21,12 @@ Feature: move (rename) folder
| old |
| new |
@issue-ocis-reva-211
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario Outline: Renaming a folder beginning with a backslash should return an error
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -34,7 +39,12 @@ Feature: move (rename) folder
| old |
| new |
@issue-ocis-reva-211
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario Outline: Renaming a folder including a backslash encoded should return an error
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -47,6 +57,12 @@ Feature: move (rename) folder
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario Outline: Move a folder into an other one
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -62,6 +78,12 @@ Feature: move (rename) folder
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario Outline: Move a folder into a nonexistent one
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -74,6 +96,12 @@ Feature: move (rename) folder
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario Outline: renaming folder with dots in the path
Given using <dav_version> DAV path
And user "Alice" has created folder "<folder_name>"
Expand All @@ -94,6 +122,15 @@ Feature: move (rename) folder
| new | /... |
| new | /..upload |
@skipOnOcV10 @personalSpace
Examples:
| dav_version | folder_name |
| spaces | /upload. |
| spaces | /upload.1 |
| spaces | /upload...1.. |
| spaces | /... |
| spaces | /..upload |
@issue-ocis-3023
Scenario Outline: Moving a folder into a sub-folder of itself
Given using <dav_version> DAV path
Expand All @@ -109,3 +146,8 @@ Feature: move (rename) folder
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: users cannot move (rename) a folder to a blacklisted name
Given using OCS API version "1"
And user "Alice" has been created with default attributes and without skeleton files

@issue-ocis-reva-211

Scenario Outline: Rename a folder to a name that is banned by default
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -21,6 +21,11 @@ Feature: users cannot move (rename) a folder to a blacklisted name
| old |
| new |

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


Scenario Outline: Rename a folder to a banned name
Given using <dav_version> DAV path
Expand All @@ -35,6 +40,11 @@ Feature: users cannot move (rename) a folder to a blacklisted name
| old |
| new |

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

@skipOnOcV10.3
Scenario Outline: rename a folder to a folder name that matches (or not) blacklisted_files_regex
Given using <dav_version> DAV path
Expand Down Expand Up @@ -70,3 +80,8 @@ Feature: users cannot move (rename) a folder to a blacklisted name
| dav_version |
| old |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Feature: users cannot move (rename) a folder to or into an excluded directory
Given using OCS API version "1"
And user "Alice" has been created with default attributes and without skeleton files


Scenario Outline: Rename a folder to an excluded directory name
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -21,6 +22,12 @@ Feature: users cannot move (rename) a folder to or into an excluded directory
| old |
| new |

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


Scenario Outline: Rename a folder to an excluded directory name inside a parent directory
Given using <dav_version> DAV path
And user "Alice" has created folder "/testshare"
Expand All @@ -35,6 +42,11 @@ Feature: users cannot move (rename) a folder to or into an excluded directory
| old |
| new |

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

@skipOnOcV10.3
Scenario Outline: rename a folder to a folder name that matches (or not) excluded_directories_regex
Given using <dav_version> DAV path
Expand Down Expand Up @@ -71,3 +83,8 @@ Feature: users cannot move (rename) a folder to or into an excluded directory
| dav_version |
| old |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
2 changes: 1 addition & 1 deletion tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public function usingSpacesDavPath():void {
public function getFullDavFilesPath(string $user):string {
if ($this->getDavPathVersion() === WebDavHelper::DAV_VERSION_SPACES) {
$spaceId = $this->getPersonalSpaceIdForUser($user);
$spaceDavPath = "dav/spaces/users/" . $spaceId . '/';
$spaceDavPath = "dav/spaces/" . $spaceId . '/';
$path = $this->getBasePath() . "/" .
$spaceDavPath;
} else {
Expand Down

0 comments on commit bcd2c3e

Please sign in to comment.