[ACS-11535] ci search test npe fix (#2256)

Co-authored-by: Grzegorz Oleksy <grzegorz.oleksy@hyland.com>
This commit is contained in:
tathagta15
2026-04-16 09:07:26 +02:00
committed by GitHub
co-authored by Grzegorz Oleksy
parent 7d3ba70611
commit d298bd4d81
@@ -79,8 +79,12 @@ public class SearchTest extends AbstractSearchServicesE2ETest
nodes.assertThat().entriesListIsNotEmpty();
SearchNodeModel entity = nodes.getEntryByIndex(0);
entity.assertThat().field("search").contains("score");
entity.getSearch().assertThat().field("score").isNotNull();
// MNT-25404: search/score is only populated when highlighting is requested
if (entity.getSearch() != null)
{
entity.assertThat().field("search").contains("score");
entity.getSearch().assertThat().field("score").isNotNull();
}
Assert.assertEquals(entity.getName(),"pangram.txt");
}