mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-15 15:28:50 -04:00
Add the new alert button to previous alerts page
Feels like it should behave the same way as the current alerts page.
This commit is contained in:
@@ -357,16 +357,20 @@ def test_broadcast_dashboard(
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('endpoint', (
|
||||
'.broadcast_dashboard', '.broadcast_dashboard_previous',
|
||||
))
|
||||
def test_broadcast_dashboard_does_not_have_button_for_view_only_user(
|
||||
client_request,
|
||||
service_one,
|
||||
active_user_view_permissions,
|
||||
mock_get_broadcast_messages,
|
||||
endpoint,
|
||||
):
|
||||
service_one['permissions'] += ['broadcast']
|
||||
client_request.login(active_user_view_permissions)
|
||||
page = client_request.get(
|
||||
'.broadcast_dashboard',
|
||||
endpoint,
|
||||
service_id=SERVICE_ONE_ID,
|
||||
)
|
||||
assert not page.select('a.govuk-button')
|
||||
@@ -420,6 +424,15 @@ def test_previous_broadcasts_page(
|
||||
'Example template This is a test Broadcast yesterday at 2:20am England Scotland',
|
||||
]
|
||||
|
||||
button = page.select_one(
|
||||
'.js-stick-at-bottom-when-scrolling a.govuk-button.govuk-button--secondary'
|
||||
)
|
||||
assert normalize_spaces(button.text) == 'New alert'
|
||||
assert button['href'] == url_for(
|
||||
'main.new_broadcast',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
)
|
||||
|
||||
|
||||
def test_new_broadcast_page(
|
||||
client_request,
|
||||
|
||||
Reference in New Issue
Block a user