]> source.dussan.org Git - nextcloud-server.git/commitdiff
test boolean favorite 41668/head
authorMaxence Lange <maxence@artificial-owl.com>
Wed, 22 Nov 2023 14:16:56 +0000 (13:16 -0100)
committerMaxence Lange <maxence@artificial-owl.com>
Wed, 22 Nov 2023 14:17:49 +0000 (13:17 -0100)
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
build/integration/features/bootstrap/WebDav.php
build/integration/features/dav-v2.feature

index 9c81a5817b4b0cb41b97a0a9074af64a74957ca4..4212f56ce2b4410415c5a0717bedb310eaa839cd 100644 (file)
@@ -231,6 +231,24 @@ trait WebDav {
                Assert::assertEquals(207, $this->response->getStatusCode());
        }
 
+       /**
+        * @Then /^Favorite search should work$/
+        */
+       public function searchFavorite(): void {
+               $this->searchFile(
+                       $this->currentUser,
+                       null,
+                       null,
+                       '<d:eq>
+                       <d:prop>
+                               <oc:favorite/>
+                       </d:prop>
+                       <d:literal>yes</d:literal>
+               </d:eq>'
+               );
+               Assert::assertEquals(207, $this->response->getStatusCode());
+       }
+
        /**
         * @Then /^Downloaded content when downloading file "([^"]*)" with range "([^"]*)" should be "([^"]*)"$/
         * @param string $fileSource
index 4dd79ec7b9e1409c077ddfec52656feb3f6a2af9..235ae5339134e1a8cc8eeb092d9cabb1df7a1561 100644 (file)
@@ -86,3 +86,11 @@ Feature: dav-v2
                And As an "admin"
                When User "user0" uploads file "data/green-square-256.png" to "/image.png"
                When Image search should work
+
+  Scenario: Create a search query on favorite
+    Given using new dav path
+    And As an "admin"
+    And user "user0" exists
+    When User "user0" uploads file "data/green-square-256.png" to "/fav_image.png"
+    When user "user0" favorites element "/fav_image.png"
+    When Favorite search should work