diff --git a/app/assets/stylesheets/app.scss b/app/assets/stylesheets/app.scss index 1135d69ab..ff4582e89 100644 --- a/app/assets/stylesheets/app.scss +++ b/app/assets/stylesheets/app.scss @@ -210,3 +210,46 @@ details .arrow { .heading-upcoming-jobs { margin-top: govuk-spacing(3); } + +@keyframes live-pulse { + 0% { + background: $red; + box-shadow: inset 0 0 0 2px $red, inset 0 0 0 4px $white; + } + 40% { + background: $red; + box-shadow: inset 0 0 0 2px $red, inset 0 0 0 4px $white; + } + 50% { + background: $white; + box-shadow: inset 0 0 0 2px $red, inset 0 0 0 2px $white; + } + 100% { + background: $white; + box-shadow: inset 0 0 0 2px $red, inset 0 0 0 4px $white; + } +} + +.live-broadcast { + + color: $red; + font-weight: bold; + position: relative; + display: inline-block; + + &:before { + content: ""; + display: block; + float: right; + margin-top: 1px; + margin-left: 5px; + border: none; + background: $red; + width: 19px; + height: 19px; + border-radius: 50%; + animation: live-pulse 1.5s infinite; + //box-shadow: inset 0 0 0 2px $red, inset 0 0 0 5px $white; + } + +} diff --git a/app/templates/views/broadcast/dashboard.html b/app/templates/views/broadcast/dashboard.html index c44257e62..7ab330edb 100644 --- a/app/templates/views/broadcast/dashboard.html +++ b/app/templates/views/broadcast/dashboard.html @@ -10,14 +10,6 @@
+
Live until {{ item.finishes_at|format_datetime_relative }}
{% elif item.status == 'cancelled' %} diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index a99b6193d..1adce2a6a 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -103,8 +103,8 @@ def test_empty_broadcast_dashboard( assert [ normalize_spaces(row.text) for row in page.select('tbody tr .table-empty-message') ] == [ - 'You do not have any broadcasts waiting for approval', 'You do not have any live broadcasts at the moment', + 'You do not have any broadcasts waiting for approval', 'You do not have any previous broadcasts', ] @@ -120,22 +120,23 @@ def test_broadcast_dashboard( '.broadcast_dashboard', service_id=SERVICE_ONE_ID, ) + assert normalize_spaces(page.select('main h2')[0].text) == ( - 'Waiting for approval' + 'Live broadcasts' ) assert [ normalize_spaces(row.text) for row in page.select('table')[0].select('tbody tr') ] == [ - 'Example template To England and Scotland Prepared by Test User', + 'Example template To England and Scotland Live until tomorrow at 2:20am', ] assert normalize_spaces(page.select('main h2')[1].text) == ( - 'Live broadcasts' + 'Waiting for approval' ) assert [ normalize_spaces(row.text) for row in page.select('table')[1].select('tbody tr') ] == [ - 'Example template To England and Scotland Live until tomorrow at 2:20am', + 'Example template To England and Scotland Prepared by Test User', ] assert normalize_spaces(page.select('main h2')[2].text) == (