Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Attempt to fix some error message-related functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Feb 16, 2015
1 parent 5520514 commit 95cff3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions functional-test/src/main/java/org/zanata/page/CorePage.java
Expand Up @@ -131,16 +131,17 @@ public List<String> expectError(final String expected) {
waitForAMoment().withMessage(msg).until(new Predicate<WebDriver>() {
@Override
public boolean apply(WebDriver input) {
return getErrors().contains(expected);
List<String> errors = getErrors();
return errors.contains(expected);
}
});
return getErrors();
}

public String getNotificationMessage() {
log.info("Query notification message");
List<WebElement> messages = waitForElementExists(By.id("messages"))
.findElements(By.tagName("li"));
List<WebElement>messages = (List<WebElement>) getExecutor()
.executeScript("return $('#messages li')");
return messages.size() > 0 ? messages.get(0).getText() : "";
}

Expand Down
Expand Up @@ -15,6 +15,7 @@ javax.validation.constraints.Url.message=must be a valid URL
#javax.validation.constraints.UrlNoSlash.message=must be a valid URL (without final slash)
javax.validation.constraints.NotDuplicateEmail.message=duplicate email
javax.validation.constraints.EmailList.message=invalid email or incorrect comma placement
org.hibernate.validator.constraints.NotEmpty.message=may not be empty
org.jboss.seam.captcha.error=incorrect response

validation.username.constraints=Between 3 and 20 lowercase letters, numbers and underscores only

0 comments on commit 95cff3e

Please sign in to comment.