Skip to content

Commit

Permalink
Merge pull request #414 from praekeltfoundation/consistent-labels
Browse files Browse the repository at this point in the history
Consistent labels
  • Loading branch information
erikh360 authored Feb 13, 2025
2 parents 6a04e10 + c920cd9 commit 2c3475a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Remove whatsapp body hidden characters
- Fix for assessment import for multiple languages
- Add locale filtering to assessments API
- Consistent labelling on import forms
### Removed
- Locale field on exports
-->
Expand Down
2 changes: 1 addition & 1 deletion home/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class UploadFileForm(forms.Form):
FILE_CHOICES = (("CSV", "CSV file"), ("XLSX", "Excel File"))
FILE_CHOICES = (("CSV", "CSV File"), ("XLSX", "Excel File"))
file = forms.FileField()
file_type = forms.ChoiceField(choices=FILE_CHOICES)

Expand Down
7 changes: 2 additions & 5 deletions home/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,7 @@ def test_form_has_all_expected_options(self, admin_client):
file_upload = form.find("input", type="file", id="id_file")
assert file_upload

assert find_options(form, "file_type") == ["CSV file", "Excel File"]
# TODO: consistency in the labeling, either both "file" or both "File"

assert find_options(form, "file_type") == ["CSV File", "Excel File"]
assert find_options(soup, "purge") == ["No", "Yes"]

all_locales = [locale.language_name for locale in Locale.objects.all()]
Expand Down Expand Up @@ -690,8 +688,7 @@ def test_ordered_form_has_all_expected_options(self, admin_client):
file_upload = form.find("input", type="file", id="id_file")
assert file_upload

assert find_options(form, "file_type") == ["CSV file", "Excel File"]

assert find_options(form, "file_type") == ["CSV File", "Excel File"]
assert find_options(soup, "purge") == ["No", "Yes"]


Expand Down

0 comments on commit 2c3475a

Please sign in to comment.