From a11b5ecde51f058a5cd19cb228ecf3782c5641ee Mon Sep 17 00:00:00 2001 From: nabim777 Date: Tue, 18 Jul 2023 10:52:46 +0545 Subject: [PATCH] add api test for search restored file through tag --- tests/acceptance/config/behat.yml | 1 + .../features/apiFullTextSearch/search.feature | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index aca23fc38cd..c9ee6b05a2f 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -189,6 +189,7 @@ default: - CapabilitiesContext: - FilesVersionsContext: - OCSContext: + - TrashbinContext: extensions: rdx\behatvars\BehatVariablesExtension: ~ diff --git a/tests/acceptance/features/apiFullTextSearch/search.feature b/tests/acceptance/features/apiFullTextSearch/search.feature index 970e9d86d34..29d21d16e3e 100644 --- a/tests/acceptance/features/apiFullTextSearch/search.feature +++ b/tests/acceptance/features/apiFullTextSearch/search.feature @@ -25,3 +25,23 @@ Feature: full text search | old | | new | | spaces | + + + Scenario Outline: search restored files using content + Given using DAV path + And user "Alice" has uploaded file with content "hello world" to "file1.txt" + And user "Alice" has uploaded file with content "Namaste nepal" to "file2.txt" + And user "Alice" has deleted file "file1.txt" + And user "Alice" has restored the file with original path "file1.txt" + And user "Alice" searches for "Content:hello" 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: + | file1.txt | + And the search result of user "Alice" should not contain these entries: + | file2.txt | + Examples: + | dav-path-version | + | old | + | new | + | spaces |