Skip to content

Commit

Permalink
Improve vaccine and programme error messages (#3120)
Browse files Browse the repository at this point in the history
When importing vaccination records, the current error messages weren't
clear enough and we've been given some improved content.
  • Loading branch information
thomasleese authored Mar 3, 2025
2 parents 108dbd6 + 793cf50 commit 8a3c536
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ en:
equal_to: Enter an organisation code that matches the current organisation.
programme_name:
blank: Enter a programme
inclusion: Enter a programme administered by this organisation
inclusion: This programme is not available in this session
reason:
blank: Enter a valid reason
school_name:
Expand All @@ -307,7 +307,8 @@ en:
uuid:
inclusion: Enter an existing record
vaccine_given:
inclusion: Enter a valid vaccine, eg Gardasil9.
blank: Enter a vaccine
inclusion: This vaccine is not available in this session
import_duplicate_form:
attributes:
apply_changes:
Expand Down
6 changes: 3 additions & 3 deletions spec/models/immunisation_import_row_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/You need to record whether the child was vaccinated or not/
)
expect(immunisation_import_row.errors[:programme_name]).to include(
"Enter a programme administered by this organisation"
"This programme is not available in this session"
)
end
end
Expand Down Expand Up @@ -100,7 +100,7 @@
it "has errors" do
expect(immunisation_import_row).to be_invalid
expect(immunisation_import_row.errors[:vaccine_given]).to eq(
["Enter a valid vaccine, eg Gardasil9."]
["This vaccine is not available in this session"]
)
end
end
Expand Down Expand Up @@ -351,7 +351,7 @@
it "has errors" do
expect(immunisation_import_row).to be_invalid
expect(immunisation_import_row.errors[:programme_name]).to eq(
["Enter a programme administered by this organisation"]
["This programme is not available in this session"]
)
end
end
Expand Down

0 comments on commit 8a3c536

Please sign in to comment.