mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 16:54:03 -04:00
@@ -1,17 +1,12 @@
|
|||||||
{% macro tick_cross(yes, label, truthy_hint='Can', falsey_hint='Cannot') %}
|
{% macro tick_cross(yes, label, truthy_hint='Can', falsey_hint='Cannot') %}
|
||||||
<li>
|
|
||||||
{% if yes %}
|
{% if yes %}
|
||||||
|
<li>
|
||||||
<span class="tick-cross-tick">
|
<span class="tick-cross-tick">
|
||||||
<span class="usa-sr-only">{{ truthy_hint }}</span>
|
<span class="usa-sr-only">{{ truthy_hint }}</span>
|
||||||
{{ label}}
|
{{ label}}
|
||||||
</span>
|
</span>
|
||||||
{% else %}
|
</li>
|
||||||
<span class="tick-cross-cross">
|
|
||||||
<span class="usa-sr-only">{{ falsey_hint }}</span>
|
|
||||||
{{ label}}
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro tick_cross_done_not_done(yes, label) %}
|
{% macro tick_cross_done_not_done(yes, label) %}
|
||||||
|
|||||||
@@ -39,28 +39,12 @@ from tests.conftest import (
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
create_active_user_empty_permissions(),
|
create_active_user_empty_permissions(),
|
||||||
(
|
("Test User With Empty Permissions (you) " "Permissions"),
|
||||||
"Test User With Empty Permissions (you) "
|
|
||||||
"Permissions "
|
|
||||||
"Cannot See dashboard "
|
|
||||||
"Cannot Send messages "
|
|
||||||
"Cannot Add and edit templates "
|
|
||||||
"Cannot Manage settings, team and usage "
|
|
||||||
"Cannot Manage API integration"
|
|
||||||
),
|
|
||||||
False,
|
False,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
create_active_user_view_permissions(),
|
create_active_user_view_permissions(),
|
||||||
(
|
("Test User With Permissions (you) " "Permissions " "Can See dashboard"),
|
||||||
"Test User With Permissions (you) "
|
|
||||||
"Permissions "
|
|
||||||
"Can See dashboard "
|
|
||||||
"Cannot Send messages "
|
|
||||||
"Cannot Add and edit templates "
|
|
||||||
"Cannot Manage settings, team and usage "
|
|
||||||
"Cannot Manage API integration"
|
|
||||||
),
|
|
||||||
False,
|
False,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -69,10 +53,7 @@ from tests.conftest import (
|
|||||||
"Test User With Permissions (you) "
|
"Test User With Permissions (you) "
|
||||||
"Permissions "
|
"Permissions "
|
||||||
"Can See dashboard "
|
"Can See dashboard "
|
||||||
"Cannot Send messages "
|
"Can Add and edit templates"
|
||||||
"Can Add and edit templates "
|
|
||||||
"Cannot Manage settings, team and usage "
|
|
||||||
"Cannot Manage API integration"
|
|
||||||
),
|
),
|
||||||
False,
|
False,
|
||||||
),
|
),
|
||||||
@@ -112,15 +93,7 @@ def test_should_show_overview_page(
|
|||||||
normalize_spaces(page.select(".user-list-item")[0].text) == expected_self_text
|
normalize_spaces(page.select(".user-list-item")[0].text) == expected_self_text
|
||||||
)
|
)
|
||||||
|
|
||||||
expected = (
|
expected = "ZZZZZZZZ zzzzzzz@example.gsa.gov " "Permissions " "Can See dashboard"
|
||||||
"ZZZZZZZZ zzzzzzz@example.gsa.gov "
|
|
||||||
"Permissions "
|
|
||||||
"Can See dashboard "
|
|
||||||
"Cannot Send messages "
|
|
||||||
"Cannot Add and edit templates "
|
|
||||||
"Cannot Manage settings, team and usage "
|
|
||||||
"Cannot Manage API integration"
|
|
||||||
)
|
|
||||||
|
|
||||||
if add_details is True:
|
if add_details is True:
|
||||||
expected = f"{expected} Change details for ZZZZZZZZ zzzzzzz@example.gsa.gov"
|
expected = f"{expected} Change details for ZZZZZZZZ zzzzzzz@example.gsa.gov"
|
||||||
@@ -259,23 +232,11 @@ def test_should_show_caseworker_on_overview_page(
|
|||||||
|
|
||||||
assert normalize_spaces(page.select_one("h1").text) == "Team members"
|
assert normalize_spaces(page.select_one("h1").text) == "Team members"
|
||||||
assert normalize_spaces(page.select(".user-list-item")[0].text) == (
|
assert normalize_spaces(page.select(".user-list-item")[0].text) == (
|
||||||
"Test User With Permissions (you) "
|
"Test User With Permissions (you) " "Permissions " "Can See dashboard"
|
||||||
"Permissions "
|
|
||||||
"Can See dashboard "
|
|
||||||
"Cannot Send messages "
|
|
||||||
"Cannot Add and edit templates "
|
|
||||||
"Cannot Manage settings, team and usage "
|
|
||||||
"Cannot Manage API integration"
|
|
||||||
)
|
)
|
||||||
# [1:5] are invited users
|
# [1:5] are invited users
|
||||||
assert normalize_spaces(page.select(".user-list-item")[6].text) == (
|
assert normalize_spaces(page.select(".user-list-item")[6].text) == (
|
||||||
"Test User zzzzzzz@example.gsa.gov "
|
"Test User zzzzzzz@example.gsa.gov " "Permissions " "Can Send messages"
|
||||||
"Permissions "
|
|
||||||
"Cannot See dashboard "
|
|
||||||
"Can Send messages "
|
|
||||||
"Cannot Add and edit templates "
|
|
||||||
"Cannot Manage settings, team and usage "
|
|
||||||
"Cannot Manage API integration"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -1240,7 +1201,6 @@ def test_cancel_invited_user_doesnt_work_if_user_not_invited_to_this_service(
|
|||||||
"Permissions "
|
"Permissions "
|
||||||
"Can See dashboard "
|
"Can See dashboard "
|
||||||
"Can Send messages "
|
"Can Send messages "
|
||||||
"Cannot Add and edit templates "
|
|
||||||
"Can Manage settings, team and usage "
|
"Can Manage settings, team and usage "
|
||||||
"Can Manage API integration "
|
"Can Manage API integration "
|
||||||
"Cancel invitation for invited_user@test.gsa.gov"
|
"Cancel invitation for invited_user@test.gsa.gov"
|
||||||
@@ -1250,13 +1210,8 @@ def test_cancel_invited_user_doesnt_work_if_user_not_invited_to_this_service(
|
|||||||
"cancelled",
|
"cancelled",
|
||||||
(
|
(
|
||||||
"invited_user@test.gsa.gov (cancelled invite) "
|
"invited_user@test.gsa.gov (cancelled invite) "
|
||||||
"Permissions "
|
"Permissions"
|
||||||
# all permissions are greyed out
|
# all permissions are greyed out
|
||||||
"Cannot See dashboard "
|
|
||||||
"Cannot Send messages "
|
|
||||||
"Cannot Add and edit templates "
|
|
||||||
"Cannot Manage settings, team and usage "
|
|
||||||
"Cannot Manage API integration"
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user