mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-6311 wait for the expected records to be in the search results list
This commit is contained in:
@@ -674,9 +674,10 @@ public class BaseRMRestTest extends RestTest
|
|||||||
* @param user
|
* @param user
|
||||||
* @param term
|
* @param term
|
||||||
* @param sortby
|
* @param sortby
|
||||||
|
* @param expectedResults
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<String> searchForRMContentAsUser(UserModel user, String term, String sortby)
|
public List<String> searchForRMContentAsUser(UserModel user, String term, String sortby, List<String> expectedResults)
|
||||||
{
|
{
|
||||||
List<String> results = new ArrayList<>();
|
List<String> results = new ArrayList<>();
|
||||||
// wait for solr indexing
|
// wait for solr indexing
|
||||||
@@ -695,7 +696,7 @@ public class BaseRMRestTest extends RestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
results = searchApi.searchForRecordsAsUser(user.getUsername(), user.getPassword(), term, sortby);
|
results = searchApi.searchForRecordsAsUser(user.getUsername(), user.getPassword(), term, sortby);
|
||||||
if ((results != null && !results.isEmpty()))
|
if ((results != null && !results.isEmpty()) && results.containsAll(expectedResults))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
|
Reference in New Issue
Block a user