Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel-608 committed Oct 13, 2023
1 parent 62feae6 commit ac8c396
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,30 @@ public void testParentQueryAgainstFolderAfterCategoryDeletion()
STEP("Verify that searching by PARENT and deleted category will find no descendant nodes.");
searchQueryService.expectResultsFromQuery(query, testUser);
}

@Test(groups = TestGroup.SEARCH)
public void testParentQueryAgainstFolderAfterParentCategoryDeletion()
{
// given
STEP("Create nested folders in site's Document Library.");
folders().createNestedFolders(C);

STEP("Create nested categories.");
categories.createNestedCategories(P, Q);

STEP("Link folders to category.");
folders(C).linkToCategory(categories.get(Q));

// when
STEP("Verify that searching by PARENT and category will find one descendant node: folderC.");
SearchRequest query = req("PARENT:" + categories.get(Q).getId());
searchQueryService.expectResultsFromQuery(query, testUser, folders(C).getName());

// then
STEP("Delete categoryM.");
categories.delete(P);

STEP("Verify that searching by PARENT and deleted category will find no descendant nodes.");
searchQueryService.expectResultsFromQuery(query, testUser);
}
}

0 comments on commit ac8c396

Please sign in to comment.