Skip to content

Commit

Permalink
EVW-1484 Ambiguous error message is displayed when an invalid DOB is …
Browse files Browse the repository at this point in the history
…entered. (#47)

* Change 'numeric' error message

HOF currently treats the date 00-00-0000 as non-numeric so we need an error message that makes sense for both 12-mm-1987 and 00-00-0000

* Change acceptance tests for the new error message
  • Loading branch information
shepda authored and roc committed Aug 1, 2016
1 parent 0598a65 commit 112e661
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions acceptance_tests/features/validation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Scenario: Wrong details in Enter Your Details
And I continue
Then the validation summary should contain
"""
Please enter numbers only
Please enter a valid date, for example, 22 3 1979
Please enter your electronic visa waiver number
"""

Expand All @@ -24,15 +24,15 @@ Scenario: Entering an EVW number that is not found
We can't find your EVW
"""

Scenario: non-numeric dob
Scenario: Entering a dob that is non-numeric

Given I start the "Find your application" app
When I enter "VALID1000" into "EVW number"
And I enter the date "20-!!-1978" into "dob"
And I click confirm details
Then the validation summary should contain
"""
Please enter numbers only
Please enter a valid date, for example, 22 3 1979
"""

Scenario: Entering an EVW number that cannot be updated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dob": {
"required": "Enter your date of birth",
"numeric": "Please enter numbers only",
"numeric": "Please enter a valid date, for example, 22 3 1979",
"future": "Date of birth cannot be in the future",
"format": "Please use the correct date format, for example, 22 3 1979",
"date": "Please use the correct date format, for example, 22 3 1979"
Expand Down

0 comments on commit 112e661

Please sign in to comment.