Skip to content

Commit 0987970

Browse files
Merge pull request #41668 from nextcloud/enh/noid/test-dav-favorite-search
test boolean favorite
2 parents ee787cd + fa17de2 commit 0987970

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

build/integration/features/bootstrap/WebDav.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,24 @@ public function search(): void {
231231
Assert::assertEquals(207, $this->response->getStatusCode());
232232
}
233233

234+
/**
235+
* @Then /^Favorite search should work$/
236+
*/
237+
public function searchFavorite(): void {
238+
$this->searchFile(
239+
$this->currentUser,
240+
null,
241+
null,
242+
'<d:eq>
243+
<d:prop>
244+
<oc:favorite/>
245+
</d:prop>
246+
<d:literal>yes</d:literal>
247+
</d:eq>'
248+
);
249+
Assert::assertEquals(207, $this->response->getStatusCode());
250+
}
251+
234252
/**
235253
* @Then /^Downloaded content when downloading file "([^"]*)" with range "([^"]*)" should be "([^"]*)"$/
236254
* @param string $fileSource

build/integration/features/dav-v2.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,11 @@ Feature: dav-v2
8686
And As an "admin"
8787
When User "user0" uploads file "data/green-square-256.png" to "/image.png"
8888
When Image search should work
89+
90+
Scenario: Create a search query on favorite
91+
Given using new dav path
92+
And As an "admin"
93+
And user "user0" exists
94+
When User "user0" uploads file "data/green-square-256.png" to "/fav_image.png"
95+
When user "user0" favorites element "/fav_image.png"
96+
When Favorite search should work

0 commit comments

Comments
 (0)