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 search test for project spce #7743

Merged
merged 3 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
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
81 changes: 42 additions & 39 deletions tests/e2e/cucumber/features/integrations/search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,56 +15,46 @@ Feature: Search
When "Brian" logs in
And "Brian" opens the "files" app
And "Brian" creates the following resources
| resource | type |
| folder_from_brian | folder |
| resource | type |
| new_share_from_brian | folder |
And "Brian" uploads the following resources
| resource |
| new-lorem-big.txt |
And "Brian" shares the following resource using the sidebar panel
| resource | recipient | type | role |
| folder_from_brian | Alice | user | viewer |
| new-lorem-big.txt | Alice | user | viewer |
| resource | recipient | type | role |
| new_share_from_brian | Alice | user | viewer |
| new-lorem-big.txt | Alice | user | viewer |
And "Brian" logs out

When "Alice" logs in
And "Alice" navigates to the shared with me page
And "Alice" accepts the following share
| name |
| folder_from_brian |
| new-lorem-big.txt |
| name |
| new_share_from_brian |
| new-lorem-big.txt |
And "Alice" opens the "files" app
And "Alice" creates the following resources
| resource | type |
| folder | folder |
| FolDer | folder |
| PARENT/child | folder |
| PARENT/child-one | folder |
| PARENT/child-one/child-two | folder |
| FolDer/child-one/child-two | folder |
And "Alice" enables the option to display the hidden file
And "Alice" uploads the following resources
| resource |
| new-lorem.txt |
| .hidden-file.txt |
And "Alice" searches "new" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
| new-lorem.txt |
| new-lorem-big.txt |
But following resources should not be displayed in the search list for user "Alice"
| resource |
| PARENT |
| folder_from_brian |
| .hidden-file.txt |

# search for objects of personal space
When "Alice" searches "foldeR" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
| folder |
| FolDer |
| folder_from_brian |
| resource |
| folder |
| FolDer |
But following resources should not be displayed in the search list for user "Alice"
| resource |
| new-lorem.txt |
| new-lorem-big.txt |
| .hidden-file.txt |
| resource |
| new_share_from_brian |
| new-lorem-big.txt |
| .hidden-file.txt |

# search for hidden file
When "Alice" searches "hidden" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
Expand All @@ -74,18 +64,31 @@ Feature: Search
| folder |
| FolDer |
| PARENT |
| folder_from_brian |
| new-lorem.txt |
| new-lorem-big.txt |
When "Alice" opens folder "PARENT"

# subfolder search
And "Alice" searches "child" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
| child |
| child-one |
When "Alice" opens folder "child-one"
And "Alice" searches "child-two" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
| child-two |
But following resources should not be displayed in the search list for user "Alice"
| resource |
| folder |
| FolDer |
| folder_from_brian |
| .hidden-file.txt |
| new-lorem-big.txt |

# received shares search
And "Alice" searches "NEW" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
| new_share_from_brian |
| new-lorem-big.txt |
But following resources should not be displayed in the search list for user "Alice"
| resource |
| folder |
| FolDer |
| .hidden-file.txt |
And "Alice" logs out
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Feature: Search in the project space

Scenario: Search in the project spaces
Given "Admin" creates following users
| id |
| Alice |
And "Admin" assigns following roles to the users
| id | role |
| Alice | SpaceAdmin |
When "Alice" logs in
And "Alice" opens the "files" app
And "Alice" navigates to the projects space page
And "Alice" creates the following project spaces
| name | id |
| team | team.1 |
And "Alice" navigates to the project space "team.1"
And "Alice" creates the following resources
| resource | type |
| folder(WithSymbols:!;_+-&) | folder |
And "Alice" uploads the following resources
| resource | to |
| new-'single'quotes.txt | folder(WithSymbols:!;_+-&) |
And "Alice" navigates to the personal space page

# search for project space objects
When "Alice" searches "-'s" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
| new-'single'quotes.txt |
But following resources should not be displayed in the search list for user "Alice"
| resource |
| folder(WithSymbols:!;_+-&) |
When "Alice" searches "!;_+-&)" using the global search
Then following resources should be displayed in the search list for user "Alice"
| resource |
| folder(WithSymbols:!;_+-&) |
But following resources should not be displayed in the search list for user "Alice"
| resource |
| new-'single'quotes.txt |
And "Alice" logs out