From d1b53682cd321d3b95d340be3d24bcf2113252b5 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 13 Feb 2017 10:46:56 +0000 Subject: [PATCH] Remove `

` tag around service name in nav The heading structure of most pages is incorrect (`

` followed by `

`). The `

` indicates the main purpose of the page, the service name (currently the first `

`) doesn't need to be a heading. --- app/assets/stylesheets/components/navigation.scss | 2 +- app/templates/withnav_template.html | 4 ++-- tests/app/main/views/test_dashboard.py | 1 - tests/app/main/views/test_service_settings.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/components/navigation.scss b/app/assets/stylesheets/components/navigation.scss index 451a54910..6f1ce23b6 100644 --- a/app/assets/stylesheets/components/navigation.scss +++ b/app/assets/stylesheets/components/navigation.scss @@ -9,7 +9,7 @@ margin: 0 0 10px; position: relative; - h2 { + &-name { @include bold-19; margin: 0 0 0 0; } diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html index cf736fa68..9dbffd7e4 100644 --- a/app/templates/withnav_template.html +++ b/app/templates/withnav_template.html @@ -7,9 +7,9 @@ {% block fullwidth_content %}
Switch service
diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index 594e79d93..bd2b4b895 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -105,7 +105,6 @@ def test_should_show_recent_templates_on_dashboard( page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') headers = [header.text.strip() for header in page.find_all('h2') + page.find_all('h1')] - assert 'Test Service' in headers assert 'In the last 7 days' in headers table_rows = page.find_all('tbody')[1].find_all('tr') diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index 46dacf863..23e53a0d9 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -102,7 +102,7 @@ def test_show_restricted_service( response = logged_in_client.get(url_for('main.service_settings', service_id=service_one['id'])) page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') assert page.find('h1').text == 'Settings' - assert page.find_all('h2')[1].text == 'Your service is in trial mode' + assert page.find_all('h2')[0].text == 'Your service is in trial mode' def test_switch_service_to_live(