mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-10 14:11:25 +00:00
ACS-5624: Simple E2E test for search API response enhancement.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<name>Search Analytics E2E Tests</name>
|
||||
<description>Test Project to test Search Service and Analytics Features on a complete setup of Alfresco, Share</description>
|
||||
<properties>
|
||||
<tas.rest.api.version>23.1.0.164</tas.rest.api.version>
|
||||
<tas.rest.api.version>23.1.0.167</tas.rest.api.version>
|
||||
<tas.cmis.api.version>23.1.0.101</tas.cmis.api.version>
|
||||
<tas.utility.version>4.0.4</tas.utility.version>
|
||||
<rm.version>3.3.1</rm.version>
|
||||
|
@@ -321,4 +321,23 @@ public class SearchTest extends AbstractSearchServicesE2ETest
|
||||
|
||||
restClient.onResponse().assertThat().body("list.entries.entry[0].name", Matchers.equalToIgnoringCase(specialCharfileName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if isFavorite field is returned when requested.
|
||||
*/
|
||||
@Test
|
||||
public void searchWithIncludeIsFavorite()
|
||||
{
|
||||
SearchRequest query = new SearchRequest();
|
||||
RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
||||
queryReq.setQuery("alfresco");
|
||||
query.setQuery(queryReq);
|
||||
query.setInclude(List.of("isFavorite"));
|
||||
|
||||
query(query);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
// isFavorite field is included in the response
|
||||
restClient.onResponse().assertThat().body("list.entries.entry[0].isFavorite", Matchers.notNullValue());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user