Skip to content

Commit

Permalink
ACS-7682 Add test for query with StoreRef (#2974)
Browse files Browse the repository at this point in the history
* ACS-7682 add test for query with StoreRef

* ACS-8934 Fix duplicate test name

* ACS-7682 Fix PMD issue

---------

Co-authored-by: Damian Ujma <[email protected]>
  • Loading branch information
SaraAspery and damianujma authored Nov 8, 2024
1 parent fa61bef commit acbe17a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
/**
* Tests to verify live indexing of paths using Elasticsearch.
*/
@SuppressWarnings({"PMD.JUnitTestsShouldIncludeAssert"}) // these are TAS E2E tests and use searchQueryService.expectResultsFromQuery for assertion
@ContextConfiguration (locations = "classpath:alfresco-elasticsearch-context.xml",
initializers = AlfrescoStackInitializer.class)
public class CategoryIndexingTests extends AbstractTestNGSpringContextTests
Expand Down Expand Up @@ -108,6 +109,14 @@ public void testFindDocumentByCategory()
searchQueryService.expectResultsFromQuery(query, testUser, testFile.getName());
}

/** Check we can find the document assigned to a category even when the query includes a StoreRef. */
@Test (groups = TestGroup.SEARCH)
public void testFindDocumentByCategoryWithStoreRef()
{
SearchRequest query = req("cm:categories:\"workspace://SpacesStore/" + categoryA.getId() + "\"");
searchQueryService.expectResultsFromQuery(query, testUser, testFile.getName());
}

/** Check we can find the folder and document assigned to the other category. */
@Test (groups = TestGroup.SEARCH)
public void testFindFolderByCategory() {
Expand Down

0 comments on commit acbe17a

Please sign in to comment.