Make the permission labels shorter

They were feeling a bit heavy on the _Team members_ page. We can remove
some words without losing any meaning.
This commit is contained in:
Chris Hill-Scott
2018-08-08 14:23:24 +01:00
parent 347912876c
commit 61507fda8f
2 changed files with 45 additions and 45 deletions

View File

@@ -21,10 +21,10 @@ roles_by_permission = {
all_permissions = set(roles_by_permission.values())
permissions = (
('view_activity', 'See dashboard and reports'),
('send_messages', 'Send messages using templates'),
('view_activity', 'See dashboard'),
('send_messages', 'Send messages'),
('manage_templates', 'Add and edit templates'),
('manage_service', 'Manage settings, team members and usage'),
('manage_service', 'Manage settings, team and usage'),
('manage_api_keys', 'Manage API integration'),
)

View File

@@ -25,18 +25,18 @@ from tests.conftest import service_one as create_sample_service
active_user_with_permissions,
(
'Test User (you) '
'Can See dashboard and reports '
'Can Send messages using templates '
'Can See dashboard '
'Can Send messages '
'Can Add and edit templates '
'Can Manage settings, team members and usage '
'Can Manage settings, team and usage '
'Can Manage API integration'
),
(
'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration '
'Edit permissions'
)
@@ -45,18 +45,18 @@ from tests.conftest import service_one as create_sample_service
active_user_empty_permissions,
(
'Test User With Empty Permissions (you) '
'Cant See dashboard and reports '
'Cant Send messages using templates '
'Cant See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
),
(
'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
),
),
@@ -64,18 +64,18 @@ from tests.conftest import service_one as create_sample_service
active_user_view_permissions,
(
'Test User With Permissions (you) '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
),
(
'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
)
),
@@ -83,18 +83,18 @@ from tests.conftest import service_one as create_sample_service
active_user_manage_template_permission,
(
'Test User With Permissions (you) '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Can Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
),
(
'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
)
),
@@ -102,18 +102,18 @@ from tests.conftest import service_one as create_sample_service
active_user_manage_template_permission,
(
'Test User With Permissions (you) '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Can Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
),
(
'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
)
),
@@ -174,19 +174,19 @@ def test_should_show_caseworker_on_overview_page(
assert normalize_spaces(page.select_one('h1').text) == 'Team members'
assert normalize_spaces(page.select('.user-list-item')[0].text) == (
'Test User With Permissions (you) '
'Can See dashboard and reports '
'Cant Send messages using templates '
'Can See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
)
# [1:5] are invited users
assert normalize_spaces(page.select('.user-list-item')[6].text) == (
'Test User zzzzzzz@example.gov.uk '
'Cant See dashboard and reports '
'Can Send messages using templates '
'Cant See dashboard '
'Can Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
)
@@ -605,20 +605,20 @@ def test_cancel_invited_user_cancels_user_invitations(
@pytest.mark.parametrize('invite_status, expected_text', [
('pending', (
'invited_user@test.gov.uk (invited) '
'Can See dashboard and reports '
'Can Send messages using templates '
'Can See dashboard '
'Can Send messages '
'Cant Add and edit templates '
'Can Manage settings, team members and usage '
'Can Manage settings, team and usage '
'Can Manage API integration '
'Cancel invitation'
)),
('cancelled', (
'invited_user@test.gov.uk (cancelled invite) '
# all permissions are greyed out
'Cant See dashboard and reports '
'Cant Send messages using templates '
'Cant See dashboard '
'Cant Send messages '
'Cant Add and edit templates '
'Cant Manage settings, team members and usage '
'Cant Manage settings, team and usage '
'Cant Manage API integration'
)),
])