-
Notifications
You must be signed in to change notification settings - Fork 190
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
ApiTest. search entity from project space and shares jail #4054
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
@api @skipOnOcV10 | ||
Feature: Search | ||
It is possible to search files in the shares jail and the project space | ||
|
||
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production | ||
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 | ||
|
||
Background: | ||
Given these users have been created with default attributes and without skeleton files: | ||
| username | | ||
| Alice | | ||
| Brian | | ||
And using new DAV path | ||
And the administrator has given "Alice" the role "Admin" using the settings api | ||
And user "Alice" has created a space "find data" with the default quota using the GraphApi | ||
And user "Alice" has created a folder "folder/SubFolder1/subFOLDER2" in space "find data" | ||
And user "Alice" has uploaded a file inside space "find data" with content "some content" to "folder/SubFolder1/subFOLDER2/insideTheFolder.txt" | ||
|
||
|
||
Scenario: Alice can find data from the project space | ||
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 | ||
And the search result of user "Alice" should contain these entries: | ||
| /folder | | ||
| /folder/SubFolder1 | | ||
| /folder/SubFolder1/subFOLDER2 | | ||
| /folder/SubFolder1/subFOLDER2/insideTheFolder.txt | | ||
|
||
|
||
Scenario: Alice can find data from the project space | ||
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 | ||
And the search result of user "Alice" should contain these entries: | ||
| /folder/SubFolder1 | | ||
| /folder/SubFolder1/subFOLDER2 | | ||
But the search result of user "Alice" should not contain these entries: | ||
| /folder | | ||
| /folder/SubFolder1/subFOLDER2/insideTheFolder.txt | | ||
|
||
|
||
Scenario: Brian can find data from the shares jail | ||
Given user "Alice" shares the following entity "folder" inside of space "find data" with user "Brian" with role "viewer" | ||
And user "Brian" has accepted share "/folder" offered by user "Alice" | ||
When user "Brian" searches for "folder" using the WebDAV API | ||
Then the HTTP status code should be "207" | ||
And the search result should contain "4" entries | ||
And the search result of user "Brian" should contain these entries: | ||
| /folder | | ||
| /folder/SubFolder1 | | ||
| /folder/SubFolder1/subFOLDER2 | | ||
| /folder/SubFolder1/subFOLDER2/insideTheFolder.txt | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we run PHP lint here? this should have been caught by CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran
make test-php-style-fix
and gotNo fixable errors were found