Replace generated content with proper heading

Brings in https://github.com/alphagov/notifications-utils/pull/797 but
adapts the CSS so nothing changes visually
This commit is contained in:
Chris Hill-Scott
2020-10-06 10:09:25 +01:00
parent 3f338d45ca
commit 8ff9ec6d97
5 changed files with 28 additions and 19 deletions

View File

@@ -1,20 +1,21 @@
.broadcast-message-wrapper {
.broadcast-message {
position: relative;
width: 100%;
max-width: 464px;
box-sizing: border-box;
padding: govuk-spacing(9) govuk-spacing(3) govuk-spacing(3) govuk-spacing(3);
background: $panel-colour;
box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.05);
border-radius: 5px;
white-space: normal;
margin: govuk-spacing(2) 0 govuk-spacing(4) 0;
clear: both;
word-wrap: break-word;
&-wrapper {
position: relative;
width: 100%;
max-width: 464px;
box-sizing: border-box;
padding: govuk-spacing(9) govuk-spacing(3) govuk-spacing(3) govuk-spacing(3);
background: $panel-colour;
box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.05);
border-radius: 5px;
white-space: normal;
margin: govuk-spacing(2) 0 govuk-spacing(4) 0;
clear: both;
word-wrap: break-word;
}
&:before {
content: "Emergency alert";
&-heading {
display: block;
position: absolute;
top: 0;

View File

@@ -24,7 +24,7 @@ Shapely==1.7.1
awscli-cwlogs>=1.4,<1.5
itsdangerous==1.1.0
git+https://github.com/alphagov/notifications-utils.git@42.2.1#egg=notifications-utils==42.2.1
git+https://github.com/alphagov/notifications-utils.git@42.2.2#egg=notifications-utils==42.2.2
git+https://github.com/alphagov/govuk-frontend-jinja.git@v0.5.1-alpha#egg=govuk-frontend-jinja==0.5.1-alpha
# gds-metrics requires prometheseus 0.2.0, override that requirement as later versions bring significant performance gains

View File

@@ -26,7 +26,7 @@ Shapely==1.7.1
awscli-cwlogs>=1.4,<1.5
itsdangerous==1.1.0
git+https://github.com/alphagov/notifications-utils.git@42.2.1#egg=notifications-utils==42.2.1
git+https://github.com/alphagov/notifications-utils.git@42.2.2#egg=notifications-utils==42.2.2
git+https://github.com/alphagov/govuk-frontend-jinja.git@v0.5.1-alpha#egg=govuk-frontend-jinja==0.5.1-alpha
# gds-metrics requires prometheseus 0.2.0, override that requirement as later versions bring significant performance gains
@@ -34,10 +34,10 @@ prometheus-client==0.8.0
gds-metrics==0.2.4
## The following requirements were added by pip freeze:
awscli==1.18.154
awscli==1.18.157
bleach==3.1.4
boto3==1.10.38
botocore==1.18.13
botocore==1.18.16
cachetools==4.1.0
certifi==2020.6.20
chardet==3.0.4

View File

@@ -968,9 +968,16 @@ def test_preview_broadcast_message_page(
'Scotland',
]
assert normalize_spaces(
page.select_one('h2.broadcast-message-heading').text
) == (
'Emergency alert'
)
assert normalize_spaces(
page.select_one('.broadcast-message-wrapper').text
) == (
'Emergency alert '
'This is a test'
)

View File

@@ -784,6 +784,7 @@ def test_view_broadcast_template(
) == (
normalize_spaces(page.select_one('.broadcast-message-wrapper').text)
) == (
'Emergency alert '
'This is a test'
)