mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 11:49:49 -04:00
Merge pull request #1642 from alphagov/meta
Add a meta description tag to the product page
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
<link rel="stylesheet" media="screen" href="{{ asset_url('stylesheets/main-ie8.css') }}" />
|
<link rel="stylesheet" media="screen" href="{{ asset_url('stylesheets/main-ie8.css') }}" />
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" />
|
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" />
|
||||||
|
{% block meta %}
|
||||||
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_title %}
|
{% block page_title %}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{% extends "fullwidth_template.html" %}
|
{% extends "fullwidth_template.html" %}
|
||||||
|
|
||||||
|
{% block meta %}
|
||||||
|
<meta name="description" content="GOV.UK Notify lets your send emails and text messages to your users. Try it now if you work in central government, a local authority, or the NHS.">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_title %}
|
{% block page_title %}
|
||||||
GOV.UK Notify
|
GOV.UK Notify
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
from flask import url_for
|
from flask import url_for
|
||||||
|
|
||||||
|
|
||||||
|
def test_non_logged_in_user_can_see_homepage(
|
||||||
|
client,
|
||||||
|
):
|
||||||
|
response = client.get(url_for('main.index'))
|
||||||
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||||
|
|
||||||
|
assert page.select_one('meta[name=description]')['content'].startswith(
|
||||||
|
'GOV.UK Notify lets your send emails and text messages'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_logged_in_user_redirects_to_choose_service(
|
def test_logged_in_user_redirects_to_choose_service(
|
||||||
logged_in_client,
|
logged_in_client,
|
||||||
api_user_active,
|
api_user_active,
|
||||||
@@ -27,6 +41,10 @@ def test_static_pages(
|
|||||||
response = client.get(url_for('main.{}'.format(view)))
|
response = client.get(url_for('main.{}'.format(view)))
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||||
|
|
||||||
|
assert not page.select_one('meta[name=description]')
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('view, expected_anchor', [
|
@pytest.mark.parametrize('view, expected_anchor', [
|
||||||
('delivery_and_failure', 'messagedeliveryandfailure'),
|
('delivery_and_failure', 'messagedeliveryandfailure'),
|
||||||
|
|||||||
Reference in New Issue
Block a user