diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f06214a..1b844d75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 --> diff --git a/home/forms.py b/home/forms.py index 8912403a..3f3510a8 100644 --- a/home/forms.py +++ b/home/forms.py @@ -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) diff --git a/home/tests/test_views.py b/home/tests/test_views.py index ab16e699..2bd5b26a 100644 --- a/home/tests/test_views.py +++ b/home/tests/test_views.py @@ -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()] @@ -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"]