Add live-search to set-email-branding page

This commit is contained in:
Tom Byers
2018-08-22 14:23:06 +01:00
parent 0015f086ea
commit 3ea94128c6
4 changed files with 61 additions and 2 deletions

View File

@@ -1782,6 +1782,34 @@ def test_should_show_branding_styles(
app.service_api_client.get_service.assert_called_once_with(service_one['id'])
def test_should_show_live_search_if_list_of_brand_styles_fits_onscreen(
logged_in_platform_admin_client,
service_one,
mock_get_email_branding_that_can_fit_onscreen,
):
response = logged_in_platform_admin_client.get(url_for(
'main.service_set_email_branding', service_id=service_one['id']
))
assert response.status_code == 200
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert not page.select('.live-search')
def test_should_show_live_search_if_list_of_brand_styles_taller_than_page(
logged_in_platform_admin_client,
service_one,
mock_get_more_email_branding_than_can_fit_onscreen,
):
response = logged_in_platform_admin_client.get(url_for(
'main.service_set_email_branding', service_id=service_one['id']
))
assert response.status_code == 200
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.select('.live-search')
def test_should_send_branding_and_organisations_to_preview(
logged_in_platform_admin_client,
service_one,