Skip to content

Commit

Permalink
[MISC] Add functional tests xwikisas#16
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiuchiuSorin committed Dec 4, 2024
1 parent 14b883d commit 05f446d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ void adminToolsHealthSection(TestUtils testUtils)

// Because the health check result is inserted at runtime by a velocity script, the testUtils fails to select
// the result message element. Therefore, it's necessary to select the text from the entire content.
WebElement healthCheckResult = healthSectionView.getResult();
WebElement healthCheckResult = healthSectionView.getHealthContent();
List<String> messages = List.of("Critical issues were found, please consult the results below!",
"Some issues have been found, for more details please see the results below.", "No issue found!");

boolean rightResult = messages.stream().anyMatch(healthCheckResult.getText()::equals);
boolean rightResult = messages.stream().anyMatch(healthCheckResult.getText()::contains);
assertTrue(rightResult);

WebElement logs = healthSectionView.getLogs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public WebElement getHealthJobStartButton()
}

/**
* Get the health check job result.
* Get the content of the health check dashboard.
*/
public WebElement getResult()
public WebElement getHealthContent()
{
return healthContent.findElement(By.className("health-check-result-message"));
return healthContent;
}

/**
Expand Down

0 comments on commit 05f446d

Please sign in to comment.