Fix duplicated ‘GOV.UK Notify’ in page titles

The `per_page_title` block appends ‘– GOV.UK Notify’ – there’s no need
to hard code it (see e4b040b380/app/templates/admin_template.html (L15))
This commit is contained in:
Chris Hill-Scott
2019-11-18 17:04:38 +00:00
parent 272c6a3c91
commit 0361fb6991
8 changed files with 11 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}Bad Request GOV.UK Notify{% endblock %}
{% block per_page_title %}Bad request{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">

View File

@@ -1,5 +1,5 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}You are not authorised to see this page GOV.UK Notify{% endblock %}
{% block per_page_title %}You are not authorised to see this page{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">

View File

@@ -1,5 +1,5 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}You are not allowed to see this page GOV.UK Notify{% endblock %}
{% block per_page_title %}You are not allowed to see this page{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">

View File

@@ -1,5 +1,5 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}Page not found GOV.UK Notify{% endblock %}
{% block per_page_title %}Page not found{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">

View File

@@ -1,5 +1,5 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}Page not found GOV.UK Notify{% endblock %}
{% block per_page_title %}Page not found{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">

View File

@@ -1,5 +1,5 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}File too big GOV.UK Notify{% endblock %}
{% block per_page_title %}File too big{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">

View File

@@ -1,5 +1,5 @@
{% extends "withoutnav_template.html" %}
{% block per_page_title %}Sorry, theres a problem with the service GOV.UK Notify{% endblock %}
{% block per_page_title %}Sorry, theres a problem with the service{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">

View File

@@ -10,6 +10,7 @@ def test_bad_url_returns_page_not_found(client):
assert response.status_code == 404
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.h1.string.strip() == 'Page not found'
assert page.title.string.strip() == 'Page not found GOV.UK Notify'
def test_load_service_before_request_handles_404(client_request, mocker):
@@ -38,6 +39,7 @@ def test_malformed_token_returns_page_not_found(logged_in_client, url):
assert page.h1.string.strip() == 'Page not found'
flash_banner = page.find('div', class_='banner-dangerous').string.strip()
assert flash_banner == "Theres something wrong with the link youve used."
assert page.title.string.strip() == 'Page not found GOV.UK Notify'
def test_csrf_returns_400(logged_in_client, mocker):
@@ -50,6 +52,7 @@ def test_csrf_returns_400(logged_in_client, mocker):
assert response.status_code == 400
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.h1.string.strip() == 'Something went wrong, please go back and try again.'
assert page.title.string.strip() == 'Bad request GOV.UK Notify'
def test_csrf_redirects_to_sign_in_page_if_not_signed_in(client, mocker):
@@ -68,3 +71,4 @@ def test_405_returns_something_went_wrong_page(client, mocker):
assert response.status_code == 405
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.h1.string.strip() == 'Something went wrong, please go back and try again.'
assert page.title.string.strip() == 'Bad request GOV.UK Notify'