View edit service notes page

This commit is contained in:
Pea Tyczynska
2021-01-15 13:36:12 +00:00
parent 5818942908
commit 6d7b16fd59
4 changed files with 42 additions and 1 deletions

View File

@@ -150,6 +150,7 @@ def service_json(
contact_link=None,
organisation_id=None,
rate_limit=3000,
notes=None,
):
if users is None:
users = []
@@ -188,6 +189,7 @@ def service_json(
'consent_to_research': True,
'count_as_live': True,
'organisation': organisation_id,
'notes': notes
}

View File

@@ -5249,3 +5249,14 @@ def test_service_settings_links_to_edit_service_notes_page_for_platform_admins(
))
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert len(page.find_all('a', attrs={'href': '/services/{}/notes'.format(SERVICE_ONE_ID)})) == 1
def test_view_edit_service_notes(
platform_admin_client,
service_one,
):
response = platform_admin_client.get(url_for('main.edit_service_notes', service_id=SERVICE_ONE_ID))
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.select_one('h1').text == "Edit service notes"
assert page.find('label', class_="form-label").text.strip() == "Notes"