Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Jun 7, 2024
1 parent 74aa82e commit 96bb60e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
public class TextFieldBasicValidationTest
extends AbstractBasicValidationTest<TextField, String> {
@Test
public void requiredErrorMessage_defaultI18n_validate_assertErrorMessage() {
public void required_validate_emptyErrorMessageDisplayed() {
testField.setRequiredIndicatorVisible(true);
testField.setValue("AAA");
testField.setValue("");
Assert.assertEquals("", testField.getErrorMessage());
}

@Test
public void requiredErrorMessage_setI18n_validate_assertErrorMessage() {
public void required_setI18nErrorMessage_validate_i18nErrorMessageDisplayed() {
testField.setRequiredIndicatorVisible(true);
testField.setI18n(new TextField.TextFieldI18n()
.setRequiredErrorMessage("Field is required"));
Expand All @@ -42,14 +42,14 @@ public void requiredErrorMessage_setI18n_validate_assertErrorMessage() {
}

@Test
public void minLengthErrorMessage_defaultI18n_validate_assertErrorMessage() {
public void minLength_validate_emptyErrorMessageDisplayed() {
testField.setMinLength(3);
testField.setValue("AA");
Assert.assertEquals("", testField.getErrorMessage());
}

@Test
public void minLengthErrorMessage_setI18n_validate_assertErrorMessage() {
public void minLength_setI18nErrorMessage_validate_i18nErrorMessageDisplayed() {
testField.setMinLength(3);
testField.setI18n(new TextField.TextFieldI18n()
.setMinLengthErrorMessage("Value is too short"));
Expand All @@ -58,14 +58,14 @@ public void minLengthErrorMessage_setI18n_validate_assertErrorMessage() {
}

@Test
public void maxLengthErrorMessage_defaultI18n_validate_assertErrorMessage() {
public void maxLength_validate_emptyErrorMessageDisplayed() {
testField.setMaxLength(3);
testField.setValue("AAAA");
Assert.assertEquals("", testField.getErrorMessage());
}

@Test
public void maxLengthErrorMessage_setI18n_validate_assertErrorMessage() {
public void maxLength_setI18nErrorMessage_validate_i18nErrorMessageDisplayed() {
testField.setMaxLength(3);
testField.setI18n(new TextField.TextFieldI18n()
.setMaxLengthErrorMessage("Value is too long"));
Expand All @@ -74,14 +74,14 @@ public void maxLengthErrorMessage_setI18n_validate_assertErrorMessage() {
}

@Test
public void patternErrorMessage_defaultI18n_validate_assertErrorMessage() {
public void pattern_validate_emptyErrorMessageDisplayed() {
testField.setPattern("\\d+");
testField.setValue("AAAA");
Assert.assertEquals("", testField.getErrorMessage());
}

@Test
public void patternErrorMessage_setI18n_validate_assertErrorMessage() {
public void pattern_setI18nErrorMessage_validate_i18nErrorMessageDisplayed() {
testField.setPattern("\\d+");
testField.setI18n(new TextField.TextFieldI18n()
.setPatternErrorMessage("Value does not match the pattern"));
Expand Down

0 comments on commit 96bb60e

Please sign in to comment.