@Feature(summary = "The user must enter both an account name and email " +
"address to reset their password",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void emptyResetPasswordFieldEntries() {
ResetPasswordPage resetPasswordPage = new BasicWorkFlow()
.goToHome()
.clickSignInLink()
.goToResetPassword()
.clearFields()
.resetFailure();
assertThat(resetPasswordPage.expectError("may not be empty"))
.contains("may not be empty")
.as("Empty email error is displayed");
// All are valid, but may show at random
String error = resetPasswordPage.getErrors().get(0);
assertThat(error.equals("size must be between 3 and 20") ||
error.equals("may not be empty") ||
error.equals("must match ^[a-z\\d_]{3,20}$"))
.as("The regex match for the reset password field has failed");
}