mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-10-01 14:41:19 +00:00
Merge branch 'master' of git.alfresco.com:search_discovery/insightengine into fix/SEARCH-1829_e2e_test
This commit is contained in:
@@ -29,7 +29,6 @@ import org.alfresco.rest.search.RestRequestQueryModel;
|
|||||||
import org.alfresco.rest.search.RestResultBucketsModel;
|
import org.alfresco.rest.search.RestResultBucketsModel;
|
||||||
import org.alfresco.rest.search.SearchRequest;
|
import org.alfresco.rest.search.SearchRequest;
|
||||||
import org.alfresco.rest.search.SearchResponse;
|
import org.alfresco.rest.search.SearchResponse;
|
||||||
import org.alfresco.search.TestGroup;
|
|
||||||
import org.testng.Assert;
|
import org.testng.Assert;
|
||||||
import org.testng.annotations.BeforeClass;
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
@@ -105,14 +104,18 @@ public class SearchAPATHTest extends AbstractSearchServicesE2ETest
|
|||||||
buckets.forEach(bucket -> bucket.assertThat().field("label").contains("0/"));
|
buckets.forEach(bucket -> bucket.assertThat().field("label").contains("0/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test to test that the facet buckets are returned correctly for sub-level 1/
|
||||||
|
* Test to search for a searchString, that's unique to the test run and hence stable for any environment
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void searchLevel0andIncludeSubLevel1()
|
public void searchLevel0andIncludeSubLevel1()
|
||||||
{
|
{
|
||||||
SearchRequest searchQuery = searchRequestWithAPATHFacet("name:*", "1/");
|
SearchRequest searchQuery = searchRequestWithAPATHFacet("name:" + unique_searchString, "1/");
|
||||||
SearchResponse response = query(searchQuery);
|
SearchResponse response = query(searchQuery);
|
||||||
|
|
||||||
List<FacetFieldBucket> buckets = getBuckets(response);
|
List<FacetFieldBucket> buckets = getBuckets(response);
|
||||||
Assert.assertEquals(4, buckets.size());
|
Assert.assertEquals(buckets.size(), 1, "Incorrect bucket count");
|
||||||
|
|
||||||
getFirstBucket(response).assertThat().field("label").contains("1/");
|
getFirstBucket(response).assertThat().field("label").contains("1/");
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<dependency.alfresco-data-model.version>8.48</dependency.alfresco-data-model.version>
|
<dependency.alfresco-data-model.version>8.49</dependency.alfresco-data-model.version>
|
||||||
<dependency.jackson.version>2.10.0.pr2</dependency.jackson.version>
|
<dependency.jackson.version>2.10.0.pr2</dependency.jackson.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user