diff --git a/.circleci/config.yml b/.circleci/config.yml index b0a2b0c3..e925bcfa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,6 @@ version: 2.1 orbs: slack: circleci/slack@2.5.0 - cla-end-to-end-tests: ministryofjustice/cla-end-to-end-tests@volatile aws-cli: circleci/aws-cli@4.1 # use v4 of this orb aws-ecr: circleci/aws-ecr@9 # this orb doesn't support OIDC v2, so we use aws-cli to authenticate @@ -215,20 +214,6 @@ jobs: bin/deploy.sh << parameters.environment >> - slack/status - behave: - executor: aws-ecr/default - steps: - - checkout: - path: fala - - run: | - cd fala - source .circleci/define_build_environment_variables - echo "export FALA_IMAGE=$ECR_DEPLOY_IMAGE" >> $BASH_ENV - echo "export A11Y_ENABLED=true" >> $BASH_ENV - echo "export FALA_TESTS_ONLY=true" >> $BASH_ENV - echo "Setting FALA image $ECR_DEPLOY_IMAGE" - - cla-end-to-end-tests/behave - playwright: docker: - image: cimg/python:3.12 @@ -279,10 +264,6 @@ workflows: requires: - build context: laa-fala - - behave: - requires: - - build - context: laa-fala - deploy_with_helm: name: UAT Ephemeral deploy diff --git a/.env.example b/.env.example index 876e0034..ee5ac2bc 100644 --- a/.env.example +++ b/.env.example @@ -4,8 +4,6 @@ DEBUG = True ALLOWED_HOSTS = ["localhost", '127.0.0.1'] LAALAA_API_HOST = "https://laa-legal-adviser-api-staging.apps.live-1.cloud-platform.service.justice.gov.uk" ENVIRONMENT = "dev" -FEATURE_FLAG_NO_MAP = False -FEATURE_FLAG_SURVEY_MONKEY = False # When using virtual.env, change this to "127.0.0.1". When using docker use "db". DB_HOST = "db" diff --git a/fala/apps/adviser/forms.py b/fala/apps/adviser/forms.py index acbe7fad..7d29dc33 100644 --- a/fala/apps/adviser/forms.py +++ b/fala/apps/adviser/forms.py @@ -92,16 +92,9 @@ def clean(self): if not postcode and not data.get("name"): raise forms.ValidationError(_("Enter a postcode or an organisation name")) else: - if settings.FEATURE_FLAG_NO_MAP: - if postcode and self.region == Region.ENGLAND_OR_WALES and not self._valid_postcode(postcode): - self.add_error("postcode", (_("Enter a valid postcode"))) - else: - region = self.region - if region != Region.ENGLAND_OR_WALES: - region_error = self.REGION_NAMES[region] - msg1 = "This service does not cover " - msg2 = "Try a postcode, town or city in England or Wales." - self.add_error("postcode", "%s %s" % (_(" ".join((msg1, region_error))), _(msg2))) + if postcode and self.region == Region.ENGLAND_OR_WALES and not self._valid_postcode(postcode): + self.add_error("postcode", (_("Enter a valid postcode"))) + return data @property diff --git a/fala/apps/adviser/tests/test_crown_dependencies_view.py b/fala/apps/adviser/tests/test_crown_dependencies_view.py index d2499e55..90c5b7da 100644 --- a/fala/apps/adviser/tests/test_crown_dependencies_view.py +++ b/fala/apps/adviser/tests/test_crown_dependencies_view.py @@ -1,9 +1,8 @@ -from django.test import SimpleTestCase, Client, override_settings +from django.test import SimpleTestCase, Client from django.urls import reverse import bs4 -@override_settings(FEATURE_FLAG_NO_MAP=True) class PostcodeValidationTest(SimpleTestCase): client = Client() url = reverse("search") @@ -45,7 +44,6 @@ def test_other_region_form_and_change_search_button_visible(self): self.assertEqual(change_search_button.text.strip(), "Change search") -@override_settings(FEATURE_FLAG_NO_MAP=True) class InvalidEnglishPostcodeTest(SimpleTestCase): client = Client() url = reverse("search") diff --git a/fala/apps/adviser/tests/test_search_view_function.py b/fala/apps/adviser/tests/test_search_view_function.py index 3da38e4b..88f26167 100644 --- a/fala/apps/adviser/tests/test_search_view_function.py +++ b/fala/apps/adviser/tests/test_search_view_function.py @@ -1,9 +1,8 @@ import bs4 -from django.test import SimpleTestCase, Client, override_settings +from django.test import SimpleTestCase, Client from django.urls import reverse -@override_settings(FEATURE_FLAG_NO_MAP=True) class SearchViewFunctionTest(SimpleTestCase): client = Client() @@ -14,7 +13,6 @@ def test_invalid_postcode_generates_error(self): self.assertEqual({"postcode": ["Enter a valid postcode"]}, response.context_data["form"].errors) -@override_settings(FEATURE_FLAG_NO_MAP=True) class ResultsPageWithBothOrgAndPostcodeTest(SimpleTestCase): client = Client() url = reverse("search") @@ -65,7 +63,6 @@ def test_category_search_has_no_previous_button(self): self.assertNotContains(response, '
Try again later.
You can also find a solicitor on the Law Society website.
Search using your location, then select ‘Accepts legal aid’ to show legal aid solicitors near you.
diff --git a/fala/templates/adviser/_results.html b/fala/templates/adviser/_results.html deleted file mode 100644 index 57681715..00000000 --- a/fala/templates/adviser/_results.html +++ /dev/null @@ -1,293 +0,0 @@ -{% if data and data.count and data.count > 0 %} - {% if data.origin.postcode %} - {# - These are repeated below - #} - {% if data.origin.postcode.startswith("IM") %} -- {% if data.origin %} - {% trans page_count=data.results|length, result_count=data.count %} - Showing {{ page_count }} results around - {% pluralize %} - {{ result_count }} results in total. Showing {{ page_count }} results around - {% endtrans %} - {{ data.origin.postcode }} - {%- if form.name.value() %} - {{ _('matching') }} {{ form.name.value() }}. - {%- else -%} - . - {% endif %} - {% elif request.GET.get('postcode','') %} - {% set city_list = [] %} - {% for item in data.results %} - {# - To prevent the same place appearing twice in the list, we harmonise the ones with commin misspellings. - All ones with a common middle element (e.g. by the) are hyphenated and lower cased (remove hyphens, change case, replace hyphens). - Thornton-Cleveleys is always hyphenated. - Hull is always Kingston upon Hull (not hyphenated). - #} - {% set location = item.location.city - |replace("-"," ") - |replace(" By The "," by the ") - |replace(" In The "," in the ") - |replace(" On The "," on the ") - |replace(" By "," by ") - |replace(" In "," in ") - |replace(" On "," on ") - |replace(" Cum "," cum ") - |replace(" Upon "," upon ") - |replace(" Under "," under ") - |replace(" Super "," super ") - |replace(" by the ","-by-the-") - |replace(" in the ","-in-the-") - |replace(" on the ","-on-the-") - |replace(" by ","-by-") - |replace(" in ","-in-") - |replace(" on ","-on-") - |replace(" cum ","-cum-") - |replace(" upon ","-upon-") - |replace(" under ","-under-") - |replace(" super ","-super-") - |replace("Thornton Cleveleys","Thornton-Cleveleys") - |replace("Hull","Kingston upon Hull") - |replace("Kingston-upon-Kingston upon Hull","Kingston upon Hull") - %} - {% if location not in city_list %} - {% do city_list.append( location ) %} - {% endif %} - {% endfor %} - {% set city_list = "" ~ city_list|join('; ') ~ "" %} - - {% if form.name.value() %} - {% trans result_count=data.count, page_count=data.results|length, org_name=form.name.value(), city_name=city_list|safe %} - Showing {{ page_count }} result matching {{ org_name }} for {{ city_name }}. - {% pluralize %} - {{ result_count }} results in total. Showing {{ page_count }} results marching {{ org_name }} for {{ city_name }}. - {% endtrans %} - {% else %} - {% trans result_count=data.count, page_count=data.results|length, city_name=city_list|safe %} - Showing {{ page_count }} result for {{ city_name }}. - {% pluralize %} - {{ result_count }} results in total. Showing {{ page_count }} results for {{ city_name }}. - {% endtrans %} - {% endif %} - {% else %} - {% trans result_count=data.count, page_count=data.results|length, org_name=form.name.value() %} - Showing {{ page_count }} result for {{ org_name }}. - {% pluralize %} - {{ result_count }} results in total. Showing {{ page_count }} results for {{ org_name }}. - {% endtrans %} - {% endif %} -
- -- {{ _('Address') }}: - - {{ item.location.address }} - {{ item.location.city }} - {{ item.location.postcode }} - -
-- {{ _('Helpline') }}: - {{ item.telephone }} -
- {% if item.organisation.website %} -- {{ _('Website') }}: - - {{ item.organisation.website|url_to_human }} - -
- {% endif %} - {% if item.categories|length %} -- This accessibility statement applies to - https://find-legal-advice.justice.gov.uk/. The - Legal Aid Agency (LAA) is responsible for this service. -
- -- We want as many people as possible to be able to use this service. For example, - that means you should be able to: -
- -- AbilityNet has - advice on making your device easier to use if you have a disability. -
- -- If you need information on this service in a different format, you can contact us at - civil-legal-advice@digital.justice.gov.uk. -
- -- We’re always looking to improve the accessibility of this service. If you find any - problems that aren’t listed on this page or think we’re not meeting the requirements - of the accessibility regulations, contact - civil-legal-advice@digital.justice.gov.uk - giving details of the issue and any assistive technology you are using. -
- -- The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public - Sector Bodies (Websites and Mobile Applications) (№ 2) Accessibility Regulations - 2018 (the ‘accessibility regulations’). If you’re not happy with how we respond to - your complaint, contact the Equality - Advisory and Support Service (EASS). -
- -- The Legal Aid Agency is committed to making its service accessible, in accordance with the - Public Sector Bodies (Websites and Mobile Applications) (№ 2) Accessibility Regulations - 2018. -
- -- This service is partially compliant with the - Web Content Accessibility Guidelines version 2.1 - AA standard, due to the exemptions listed below. -
- -Not applicable
- -Not applicable
- -- Using embedded Google Maps has issues for users: -
- -- We will consider using an alternative map provider if the - service has a major redevelopment in the future. -
- -- We will monitor the accessibility of this website on an ongoing basis and fix any - accessibility issues reported to us. -
- -- This statement was prepared on 11 November 2020. -
- -- We have completed accessibility checks using core assistive technology applications - such as JAWS, Zoom Text, Dragon and Text Help. The tests were carried out by the - Ministry of Justice on 28 October 2020. -
- -- Components of this service, such as the map functionality, were also tested on - 13 July 2020 during an audit of - https://checklegalaid.service.gov.uk/. - These tests were carried out by the Digital Accessibility Centre (DAC). -
-If you are a provider and your details are incorrect, please contact your contract manager.
-