Skip to content

Commit

Permalink
search by name
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Sep 5, 2023
1 parent efbc05a commit 109b70e
Showing 1 changed file with 142 additions and 35 deletions.
177 changes: 142 additions & 35 deletions tests/acceptance/features/apiSearch/apiSpaceSearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Feature: Search
And user "Alice" has created a space "find data" with the default quota using the GraphApi
And user "Alice" has created a folder "folderMain/SubFolder1/subFOLDER2" in space "find data"
And user "Alice" has uploaded a file inside space "find data" with content "some content" to "folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt"
And using new DAV path


Scenario: user can find data from the project space
Scenario Outline: user can find data from the project space
Given using <dav-path-version> DAV path
When user "Alice" searches for "*fol*" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "4" entries
Expand All @@ -28,9 +28,18 @@ Feature: Search
| /folderMain/SubFolder1 |
| /folderMain/SubFolder1/subFOLDER2 |
| /folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt |


Scenario: user can only find data that they searched for from the project space
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user can only find data that they searched for from the project space
Given using <dav-path-version> DAV path
When user "Alice" searches for "*SUB*" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "2" entries
Expand All @@ -40,10 +49,19 @@ Feature: Search
But the search result of user "Alice" should not contain these entries:
| /folderMain |
| /folderMain/SubFolder1/subFOLDER2/insideTheFolder.txt |


Scenario: user can find data from the shares
Given user "Alice" has created a share inside of space "find data" with settings:
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user can find data from the shares
Given using <dav-path-version> DAV path
And user "Alice" has created a share inside of space "find data" with settings:
| path | folderMain |
| shareWith | Brian |
| role | viewer |
Expand All @@ -56,19 +74,37 @@ Feature: Search
| /SubFolder1/subFOLDER2 |
| /SubFolder1/subFOLDER2/insideTheFolder.txt |
And for user "Brian" the search result should contain space "mountpoint/folderMain"


Scenario: user can find hidden file
Given user "Alice" has created a folder ".space" in space "find data"
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user can find hidden file
Given using <dav-path-version> DAV path
And user "Alice" has created a folder ".space" in space "find data"
When user "Alice" searches for "*.sp*" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "1" entries
And the search result of user "Alice" should contain these entries:
| /.space |


Scenario: user cannot find pending share
Given user "Alice" has created a share inside of space "find data" with settings:
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user cannot find pending share
Given using <dav-path-version> DAV path
And user "Alice" has created a share inside of space "find data" with settings:
| path | folderMain |
| shareWith | Brian |
| role | viewer |
Expand All @@ -79,10 +115,19 @@ Feature: Search
| /SubFolder1 |
| /SubFolder1/subFOLDER2 |
| /SubFolder1/subFOLDER2/insideTheFolder.txt |


Scenario: user cannot find declined share
Given user "Alice" has created a share inside of space "find data" with settings:
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user cannot find declined share
Given using <dav-path-version> DAV path
And user "Alice" has created a share inside of space "find data" with settings:
| path | folderMain |
| shareWith | Brian |
| role | viewer |
Expand All @@ -94,23 +139,50 @@ Feature: Search
| /SubFolder1 |
| /SubFolder1/subFOLDER2 |
| /SubFolder1/subFOLDER2/insideTheFolder.txt |


Scenario: user cannot find deleted folder
Given user "Alice" has removed the folder "folderMain" from space "find data"
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user cannot find deleted folder
Given using <dav-path-version> DAV path
And user "Alice" has removed the folder "folderMain" from space "find data"
When user "Alice" searches for "*folderMain*" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "0" entries


Scenario: user can find project space by name
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user can find project space by name
Given using <dav-path-version> DAV path
When user "Alice" searches for '"*find data*"' using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "1" entries
And for user "Alice" the search result should contain space "find data"


Scenario: user can search inside folder in space
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: user can search inside folder in space
Given using <dav-path-version> DAV path
When user "Alice" searches for "*folder*" inside folder "/folderMain" in space "find data" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "3" entries
Expand All @@ -120,10 +192,19 @@ Feature: Search
| /SubFolder1/subFOLDER2/insideTheFolder.txt |
But the search result of user "Alice" should not contain these entries:
| /folderMain |


Scenario: search inside folder in shares
Given user "Alice" has created a share inside of space "find data" with settings:
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: search inside folder in shares
Given using <dav-path-version> DAV path
And user "Alice" has created a share inside of space "find data" with settings:
| path | folderMain |
| shareWith | Brian |
| role | viewer |
Expand All @@ -136,3 +217,29 @@ Feature: Search
| /SubFolder1/subFOLDER2/insideTheFolder.txt |
But the search result of user "Brian" should not contain these entries:
| /folderMain |
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |


Scenario Outline: using different search pattern. KQL feature
Given using spaces DAV path
And user "Alice" has created a folder "subfolder" in space "find data"
When user "Alice" searches for '<pattern>' using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "1" entries
And the search result of user "Alice" should contain these entries:
| <searchResult> |
Examples:
| description | pattern | searchResult |
| file name starts | fold* | /folderMain |
| file name ends | *der1 | /folderMain/SubFolder1 |
| strict search | subfolder | /subfolder |
| using patern "name:" | name:*der2 | /folderMain/SubFolder1/subFOLDER2 |
| using the pattern "name:" where the value is in quotes | name:"*der2" | /folderMain/SubFolder1/subFOLDER2 |

0 comments on commit 109b70e

Please sign in to comment.