mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 17:38:50 -04:00
Add upload letters permission to service settings page
The upload_letters permission can only be changed by Platform Admin users. It works in a similar way to the inbound_sms nested permission - you only see the row in the table if you have the 'letter' permission, but the 'letter' and 'upload_letters' are still separate permissions and changing one does not affect the other.
This commit is contained in:
@@ -74,12 +74,14 @@ def test_service_set_permission(
|
||||
({'permissions': []},
|
||||
'.service_switch_can_upload_document', {}, 'Uploading documents Off Change'),
|
||||
({'permissions': ['sms']}, '.service_set_inbound_number', {}, 'Receive inbound SMS Off Change'),
|
||||
({'permissions': ['letter']},
|
||||
'.service_set_permission', {'permission': 'upload_letters'}, 'Uploading letters Off Change'),
|
||||
])
|
||||
def test_service_setting_toggles_show(get_service_settings_page, service_one, service_fields, endpoint, kwargs, text):
|
||||
button_url = url_for(endpoint, **kwargs, service_id=service_one['id'])
|
||||
link_url = url_for(endpoint, **kwargs, service_id=service_one['id'])
|
||||
service_one.update(service_fields)
|
||||
page = get_service_settings_page()
|
||||
assert normalize_spaces(page.find('a', {'href': button_url}).find_parent('tr').text.strip()) == text
|
||||
assert normalize_spaces(page.find('a', {'href': link_url}).find_parent('tr').text.strip()) == text
|
||||
|
||||
|
||||
@pytest.mark.parametrize('service_fields, endpoint, index, text', [
|
||||
|
||||
Reference in New Issue
Block a user