@@ -216,3 +216,110 @@ Feature: app-comments
216216 And I open the unread comments for "Child folder"
217217 And I see that the details view is open
218218 And I see a comment with "Hello world" as message
219+
220+
221+
222+ Scenario : search a comment
223+ Given I am logged in
224+ And I open the details view for "welcome.txt"
225+ And I open the "Comments" tab in the details view
226+ And I create a new comment with "Hello world" as message
227+ And I see a comment with "Hello world" as message
228+ When I search for "hello"
229+ # Search results for comments also include the user that wrote the comment.
230+ Then I see that the search result 1 is "user0Hello world"
231+ And I see that the search result 1 was found in "welcome.txt"
232+
233+ Scenario : search a comment in a child folder
234+ Given I am logged in
235+ And I create a new folder named "Folder"
236+ And I enter in the folder named "Folder"
237+ And I create a new folder named "Child folder"
238+ And I open the details view for "Child folder"
239+ And I open the "Comments" tab in the details view
240+ And I create a new comment with "Hello world" as message
241+ And I see a comment with "Hello world" as message
242+ # The Files app is open again to reload the file list
243+ And I open the Files app
244+ When I search for "hello"
245+ # Search results for comments also include the user that wrote the comment.
246+ Then I see that the search result 1 is "user0Hello world"
247+ And I see that the search result 1 was found in "Folder/Child folder"
248+
249+ Scenario : search a comment by a another user
250+ Given I act as John
251+ And I am logged in as the admin
252+ And I act as Jane
253+ And I am logged in
254+ And I act as John
255+ And I rename "welcome.txt" to "shared.txt"
256+ And I share "shared.txt" with "user0"
257+ And I see that the file is shared with "user0"
258+ And I act as Jane
259+ # The Files app is open again to reload the file list
260+ And I open the Files app
261+ And I open the details view for "shared.txt"
262+ And I open the "Comments" tab in the details view
263+ And I create a new comment with "Hello world" as message
264+ And I see a comment with "Hello world" as message
265+ When I act as John
266+ And I search for "hello"
267+ # Search results for comments also include the user that wrote the comment.
268+ Then I see that the search result 1 is "user0Hello world"
269+ And I see that the search result 1 was found in "shared.txt"
270+
271+ Scenario : open a search result for a comment in a file
272+ Given I am logged in
273+ And I open the details view for "welcome.txt"
274+ And I open the "Comments" tab in the details view
275+ And I create a new comment with "Hello world" as message
276+ And I see a comment with "Hello world" as message
277+ # Force the details view to change to a different file before closing it
278+ And I create a new folder named "Folder"
279+ And I close the details view
280+ When I search for "hello"
281+ And I open the search result 1
282+ Then I see that the details view is open
283+ And I see that the file name shown in the details view is "welcome.txt"
284+ And I see a comment with "Hello world" as message
285+ And I see that the file list is currently in "Home"
286+ And I see that the file list contains a file named "welcome.txt"
287+
288+ Scenario : open a search result for a comment in a folder named like its child folder
289+ Given I am logged in
290+ And I create a new folder named "Folder"
291+ And I open the details view for "Folder"
292+ And I open the "Comments" tab in the details view
293+ And I create a new comment with "Hello world" as message
294+ And I see a comment with "Hello world" as message
295+ And I enter in the folder named "Folder"
296+ And I create a new folder named "Folder"
297+ # The Files app is open again to reload the file list
298+ And I open the Files app
299+ When I search for "hello"
300+ And I open the search result 1
301+ Then I see that the details view is open
302+ And I see that the file name shown in the details view is "Folder"
303+ And I see a comment with "Hello world" as message
304+ And I see that the file list is currently in "Home"
305+ And I see that the file list contains a file named "welcome.txt"
306+ And I see that the file list contains a file named "Folder"
307+
308+ Scenario : open a search result for a comment in a child folder
309+ Given I am logged in
310+ And I create a new folder named "Folder"
311+ And I enter in the folder named "Folder"
312+ And I create a new folder named "Child folder"
313+ And I open the details view for "Child folder"
314+ And I open the "Comments" tab in the details view
315+ And I create a new comment with "Hello world" as message
316+ And I see a comment with "Hello world" as message
317+ # The Files app is open again to reload the file list
318+ And I open the Files app
319+ When I search for "hello"
320+ And I open the search result 1
321+ Then I see that the details view is open
322+ And I see that the file name shown in the details view is "Child folder"
323+ And I see a comment with "Hello world" as message
324+ And I see that the file list is currently in "Home/Folder"
325+ And I see that the file list contains a file named "Child folder"
0 commit comments