mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Merge pull request #2501 from alphagov/update_confirm_delete_messages
Make deletion confirmation banner messages consistent across our app
This commit is contained in:
@@ -308,9 +308,9 @@ def test_should_show_confirm_revoke_api_key(
|
||||
_test_page_title=False,
|
||||
)
|
||||
assert normalize_spaces(page.select('.banner-dangerous')[0].text) == (
|
||||
'Are you sure you want to revoke this API key? '
|
||||
'‘some key name’ will no longer let you connect to GOV.UK Notify. '
|
||||
'Confirm'
|
||||
'Are you sure you want to revoke ‘some key name’? '
|
||||
'You will not be able to use this API key to connect to GOV.UK Notify. '
|
||||
'Yes, revoke this API key'
|
||||
)
|
||||
assert mock_get_api_keys.call_args_list == [
|
||||
call(
|
||||
|
||||
@@ -1612,7 +1612,8 @@ def test_confirm_delete_reply_to_email_address(
|
||||
)
|
||||
|
||||
assert normalize_spaces(page.select_one('.banner-dangerous').text) == (
|
||||
'Are you sure you want to delete this email reply-to address?'
|
||||
'Are you sure you want to delete this email reply-to address? '
|
||||
'Yes, delete'
|
||||
)
|
||||
assert 'action' not in page.select_one('.banner-dangerous form')
|
||||
assert page.select_one('.banner-dangerous form')['method'] == 'post'
|
||||
@@ -1824,7 +1825,8 @@ def test_confirm_delete_sms_sender(
|
||||
)
|
||||
|
||||
assert normalize_spaces(page.select_one('.banner-dangerous').text) == (
|
||||
'Are you sure you want to delete this text message sender?'
|
||||
'Are you sure you want to delete this text message sender? '
|
||||
'Yes, delete'
|
||||
)
|
||||
assert 'action' not in page.select_one('.banner-dangerous form')
|
||||
assert page.select_one('.banner-dangerous form')['method'] == 'post'
|
||||
|
||||
@@ -1281,9 +1281,9 @@ def test_should_show_delete_template_page_with_time_block(
|
||||
template_id=fake_uuid,
|
||||
_test_page_title=False,
|
||||
)
|
||||
assert page.h1.text == 'Are you sure you want to delete Two week reminder?'
|
||||
assert "Are you sure you want to delete ‘Two week reminder’?" in page.select('.banner-dangerous')[0].text
|
||||
assert normalize_spaces(page.select('.banner-dangerous p')[0].text) == (
|
||||
'It was last used 10 minutes ago'
|
||||
'This template was last used 10 minutes ago.'
|
||||
)
|
||||
assert normalize_spaces(page.select('.sms-message-wrapper')[0].text) == (
|
||||
'service one: Template <em>content</em> with & entity'
|
||||
@@ -1310,9 +1310,9 @@ def test_should_show_delete_template_page_with_time_block_for_empty_notification
|
||||
template_id=fake_uuid,
|
||||
_test_page_title=False,
|
||||
)
|
||||
assert page.h1.text == 'Are you sure you want to delete Two week reminder?'
|
||||
assert "Are you sure you want to delete ‘Two week reminder’?" in page.select('.banner-dangerous')[0].text
|
||||
assert normalize_spaces(page.select('.banner-dangerous p')[0].text) == (
|
||||
'It was last used more than seven days ago'
|
||||
'This template was last used more than seven days ago.'
|
||||
)
|
||||
assert normalize_spaces(page.select('.sms-message-wrapper')[0].text) == (
|
||||
'service one: Template <em>content</em> with & entity'
|
||||
@@ -1336,7 +1336,7 @@ def test_should_show_delete_template_page_with_never_used_block(
|
||||
template_id=fake_uuid,
|
||||
_test_page_title=False,
|
||||
)
|
||||
assert page.h1.text == 'Are you sure you want to delete Two week reminder?'
|
||||
assert "Are you sure you want to delete ‘Two week reminder’?" in page.select('.banner-dangerous')[0].text
|
||||
assert not page.select('.banner-dangerous p')
|
||||
assert normalize_spaces(page.select('.sms-message-wrapper')[0].text) == (
|
||||
'service one: Template <em>content</em> with & entity'
|
||||
|
||||
Reference in New Issue
Block a user