-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EL-1431: Search page - Update styling (#229)
* update view based on flag * make feature flag live in staging * update * update to stylings and layout * updates from review comments * updates from review comments * last bits of from review commets * remove duplicates * removing more duplicaation and addng in extra CSS * typo * update views.py * update to stylings * Update to test and template * remove results template * update tests * test update * revert changes * add `LAALAA_API_HOST` variable in CircleCi config * refactor test's * refactor of tests - chaneg the scope. * typo in test method * use `LiveServerTestCase` class * reformatted views, test, and base.py * revert change to `urls.py` as `adviser` already installed in `base.py` * update to the way we populate a form filed via a feature flag - based on review comment. * switch around what is shown on conditional * update on comment, on where to find documentation * update CSS * update CSS
- Loading branch information
1 parent
a71cc62
commit a78e0f1
Showing
11 changed files
with
252 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from django.test import SimpleTestCase, Client, override_settings | ||
from django.urls import reverse | ||
|
||
|
||
@override_settings(FEATURE_FLAG_NO_MAP=True) | ||
class SearchViewFunctionTest(SimpleTestCase): | ||
client = Client() | ||
|
||
url = reverse("adviser") | ||
|
||
def test_postcode_search(self): | ||
response = self.client.get(self.url, {"postcode": "PE31"}) | ||
self.assertEqual(200, response.status_code) | ||
|
||
def test_invalid_postcode_generates_error(self): | ||
response = self.client.get(self.url, {"postcode": "ZZZ"}) | ||
self.assertEqual({"postcode": ["Postcode not found"]}, response.context_data["form"].errors) | ||
|
||
|
||
@override_settings(FEATURE_FLAG_NO_MAP=True) | ||
class NewSearchViewTemplate(SimpleTestCase): | ||
client = Client() | ||
|
||
def test_template_link_and_css(self): | ||
response = self.client.get(reverse("adviser")) | ||
|
||
self.assertEqual(response.status_code, 200) | ||
|
||
# Ensure URL link is in response content | ||
self.assertContains(response, "https://www.gov.uk/check-legal-aid") | ||
|
||
# Ensure CSS class is in response content | ||
self.assertContains(response, "laa-fala__grey-box") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.