NIHVIVO-222 Selenium requires that the Base URL end in /, so the webapp name cannot be the last thing in the URL. Fix the logic.
This commit is contained in:
parent
3b879c09ef
commit
8abffc78ee
2 changed files with 4 additions and 2 deletions
|
@ -92,7 +92,8 @@ public class ModelCleanerProperties {
|
|||
String websiteUrl = getRequiredProperty(props,
|
||||
SeleniumRunnerParameters.PROP_WEBSITE_URL);
|
||||
String webappName = getRequiredProperty(props, PROP_VIVO_WEBAPP_NAME);
|
||||
if (!websiteUrl.endsWith(webappName)) {
|
||||
if ((!websiteUrl.endsWith(webappName))
|
||||
&& (!websiteUrl.endsWith(webappName + "/"))) {
|
||||
throw new IllegalArgumentException("The " + PROP_VIVO_WEBAPP_NAME
|
||||
+ " must be the last item in the "
|
||||
+ SeleniumRunnerParameters.PROP_WEBSITE_URL);
|
||||
|
|
|
@ -44,7 +44,8 @@ public class TomcatController {
|
|||
|
||||
private String figureBaseUrl() {
|
||||
String url = parms.getWebsiteUrl();
|
||||
return url.substring(0, url.length() - webappName.length());
|
||||
int end = url.lastIndexOf(webappName);
|
||||
return url.substring(0, end);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue