diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index 832230a44..06bff1ca7 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -121,12 +121,46 @@ td.table-empty-message { text-decoration: none !important; } +.button-flex-header { + flex-direction: column; + align-items: flex-start; + @include at-media(desktop) { + flex-direction: row; + display: flex; + align-items: center; + justify-content: space-between; + } +} + .user-list-edit-link:active:before, .user-list-edit-link:focus:before { box-shadow: none; border: 0; } +.user-list { + display: inline-flex; + flex-wrap: wrap; + gap: units(2); + .user-list-item { + @include at-media(desktop) { + flex: 1 1 calc(50% - units(2)); + } + flex: 1 1 calc(100% - units(2)); + border: 1px solid color('gray-cool-10'); + padding: units(2); + .tick-cross-list-permissions { + margin: units(1) 0; + padding-left: units(2); + } + .hint { + display: block; + font-size: size("body", "sm"); + font-weight: normal; + } + } +} + .template-list-item-without-ancestors .template-list-folder:active, .template-list-item-without-ancestors .template-list-folder:active::before, .template-list-item-without-ancestors .template-list-folder:focus, diff --git a/app/main/forms.py b/app/main/forms.py index 2520474fc..d9a35b72a 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1235,15 +1235,20 @@ class ChangeNameForm(StripWhitespaceForm): new_name = GovukTextInputField("Your name") +# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones class ChangePreferredTimezoneForm(StripWhitespaceForm): def __init__(self, *args, **kwargs): super(ChangePreferredTimezoneForm, self).__init__(*args, **kwargs) self.new_preferred_timezone.choices = [ + ("America/Puerto_Rico", "America/Puerto_Rico"), ("US/Eastern", "US/Eastern"), ("US/Central", "US/Central"), ("US/Mountain", "US/Mountain"), ("US/Pacific", "US/Pacific"), + ("US/Alaska", "US/Alaska"), ("US/Hawaii", "US/Hawaii"), + ("US/Aleutian", "US/Aleutian"), + ("US/Samoa", "US/Samoa"), ] new_preferred_timezone = GovukRadiosField( diff --git a/app/templates/views/manage-users.html b/app/templates/views/manage-users.html index 761a1a213..4b938e0d4 100644 --- a/app/templates/views/manage-users.html +++ b/app/templates/views/manage-users.html @@ -9,7 +9,7 @@ {% block maincolumn_content %} -
+

Team members

@@ -32,68 +32,65 @@
{% for user in users %}
-
-
-

- {%- if user.name -%} - {{ user.name }}  - {%- endif -%} - - {%- if user.status == 'pending' -%} - {{ user.email_address }} (invited) - {%- elif user.status == 'cancelled' -%} - {{ user.email_address }} (cancelled invite) - {%- elif user.status == 'expired' -%} - {{ user.email_address }} (expired invite) - {%- elif user.id == current_user.id -%} - (you) - {% else %} - {{ user.email_address }} - {% endif %} - -

-

Permissions

-
    - {% for permission, label in permissions %} - {{ tick_cross( - user.has_permission_for_service(current_service.id, permission), - label - ) }} - {% endfor %} -
- {# only show if the service has folders #} - {% if current_service.all_template_folders %} -

- {% set folder_count = user.template_folders_for_service(current_service) | length %} - - {% if folder_count == 0 %} - Cannot see any folders - {% elif folder_count != current_service.all_template_folders | length %} - Can see {{ folder_count }} folder{% if folder_count > 1 %}s{% endif %} - {% else %} - Can see all folders - {% endif%} -

+

+ {%- if user.name -%} + {{ user.name }} + {%- endif -%} + {%- if user.status == 'pending' -%} + {{ user.email_address }}(invited) + {%- elif user.status == 'cancelled' -%} + {{ user.email_address }}(cancelled invite) + {%- elif user.status == 'expired' -%} + {{ user.email_address }}(expired invite) + {%- elif user.id == current_user.id -%} + (you) + {% else %} + {{ user.email_address }} + {% endif %} +

+

Permissions

+
    + {% for permission, label in permissions %} + {{ tick_cross( + user.has_permission_for_service(current_service.id, permission), + label + ) }} + {% endfor %} +
+ {# only show if the service has folders #} + {% if current_service.all_template_folders %} +

+ {% set folder_count = user.template_folders_for_service(current_service) | length %} + {% if folder_count == 0 %} + Cannot see any folders + {% elif folder_count != current_service.all_template_folders | length %} + Can see {{ folder_count }} folder{% if folder_count > 1 %}s{% endif %} + {% else %} + Can see all folders + {% endif%} +

+ {% endif %} + {% if current_service.has_permission('email_auth') %} +

+ Signs in with + {{ user.auth_type | format_auth_type(with_indefinite_article=True) }} +

+ {% endif %} + {% if current_service.has_permission('email_auth') %} +

+ Signs in with + {{ user.auth_type | format_auth_type(with_indefinite_article=True) }} +

+ {% endif %} + {% if current_user.has_permissions('manage_service') %} + {% if user.status == 'pending' %} + Cancel invitation for {{ user.email_address }} + {% elif user.status == 'expired' %} + Resend invite for {{ user.email_address }} + {% elif user.is_editable_by(current_user) %} + Change details for {{ user.name }} {{ user.email_address }} {% endif %} - {% if current_service.has_permission('email_auth') %} -

- Signs in with - {{ user.auth_type | format_auth_type(with_indefinite_article=True) }} -

- {% endif %} -
-
- {% if current_user.has_permissions('manage_service') %} - {% if user.status == 'pending' %} - Cancel invitation for {{ user.email_address }} - {% elif user.status == 'expired' %} - Resend invite for {{ user.email_address }} - {% elif user.is_editable_by(current_user) %} - Change details for {{ user.name }} {{ user.email_address }} - {% endif %} - {% endif %} -
-
+ {% endif %}
{% endfor %}
diff --git a/deploy-config/egress_proxy/notify-admin-staging.allow.acl b/deploy-config/egress_proxy/notify-admin-staging.allow.acl index d329f111d..65c7931d2 100644 --- a/deploy-config/egress_proxy/notify-admin-staging.allow.acl +++ b/deploy-config/egress_proxy/notify-admin-staging.allow.acl @@ -1,2 +1,4 @@ gov-collector.newrelic.com egress-proxy-notify-admin-staging.apps.internal +idp.int.identitysandbox.gov +secure.login.gov diff --git a/poetry.lock b/poetry.lock index 952fa7c07..23a245ebc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -571,21 +571,26 @@ test-randomorder = ["pytest-randomly"] [[package]] name = "cyclonedx-python-lib" -version = "4.2.3" -description = "A library for producing CycloneDX SBOM (Software Bill of Materials) files." +version = "6.3.0" +description = "Python library for CycloneDX" optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.8,<4.0" files = [ - {file = "cyclonedx_python_lib-4.2.3-py3-none-any.whl", hash = "sha256:e9b923af525b6acf7bab917a35360b4b562b85dc15fde9eaa500828949adf73a"}, - {file = "cyclonedx_python_lib-4.2.3.tar.gz", hash = "sha256:904068b55d1665f0ea96f38307603cc14f95c3b421f1687fc2411326aefde3a6"}, + {file = "cyclonedx_python_lib-6.3.0-py3-none-any.whl", hash = "sha256:0e73c1036c2f7fc67adc28aef807e6b44340ea70202aab197fb06b20ea165de8"}, + {file = "cyclonedx_python_lib-6.3.0.tar.gz", hash = "sha256:82f2489de3c0cadad5af1ad7fa6b6a185f985746370245d38769699c734533c6"}, ] [package.dependencies] license-expression = ">=30,<31" packageurl-python = ">=0.11" -py-serializable = ">=0.11.1,<0.12.0" +py-serializable = ">=0.16,<0.18" sortedcontainers = ">=2.4.0,<3.0.0" +[package.extras] +json-validation = ["jsonschema[format] (>=4.18,<5.0)"] +validation = ["jsonschema[format] (>=4.18,<5.0)", "lxml (>=4,<6)"] +xml-validation = ["lxml (>=4,<6)"] + [[package]] name = "defusedxml" version = "0.7.1" @@ -1510,13 +1515,13 @@ files = [ [[package]] name = "moto" -version = "4.2.12" +version = "4.2.13" description = "" optional = false python-versions = ">=3.7" files = [ - {file = "moto-4.2.12-py2.py3-none-any.whl", hash = "sha256:bdcad46e066a55b7d308a786e5dca863b3cba04c6239c6974135a48d1198b3ab"}, - {file = "moto-4.2.12.tar.gz", hash = "sha256:7c4d37f47becb4a0526b64df54484e988c10fde26861fc3b5c065bc78800cb59"}, + {file = "moto-4.2.13-py2.py3-none-any.whl", hash = "sha256:93e0fd13b624bd79115494f833308c3641b2be0fc9f4f18aa9264aa01f6168e0"}, + {file = "moto-4.2.13.tar.gz", hash = "sha256:01aef6a489a725c8d725bd3dc6f70ff1bedaee3e2641752e4b471ff0ede4b4d7"}, ] [package.dependencies] @@ -1635,26 +1640,40 @@ files = [ [[package]] name = "newrelic" -version = "9.3.0" +version = "9.4.0" description = "New Relic Python Agent" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ - {file = "newrelic-9.3.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:f25980a8c86bda75344b5b22edd5d6ad41777776e1ed8a495eb6e38e9813b02c"}, - {file = "newrelic-9.3.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:adefb6620c5a5d75b4bf3ec565cc4d91abcb5cc4e5569f5f82ab29fa3d5aa2d9"}, - {file = "newrelic-9.3.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:27056ab8a3cf39787fc1f93f55243749dd25786f65b15032b6fbb3e8534f4c2a"}, - {file = "newrelic-9.3.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:663fa1c074661f93abf681c8f6028de64744c67f004b722835de1372b6bc4d19"}, - {file = "newrelic-9.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83346c8f0bcb8f07f74c88f6073e4d44a2e2b3eeec5b2ebe8c450ae695d02b88"}, - {file = "newrelic-9.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2187078d7b0054b30f39dbf891cb2caa71a7046f6d0258fb8c0fcfce70777774"}, - {file = "newrelic-9.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe0f5edd4eba3d62742b3b0730bb4f826be015dd7fbb9c455b01c410421661a2"}, - {file = "newrelic-9.3.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8577a0f733174bee70a147f71aa061fb44a593a1be841feffe12dff480c6e02e"}, - {file = "newrelic-9.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:234594655ac0fbe938d34ce5d5d38549d0f5cc11d0552170903ad09574bb4499"}, - {file = "newrelic-9.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ce38949404e974b566b21487394f5ea36a1fb80ba36cc4a6e8fb968d2e150ab"}, - {file = "newrelic-9.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a750ffed8aedacdafcb548b3d3f45630a96862db630c9f72520ebbfe91e4e9e0"}, - {file = "newrelic-9.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d01d0f0c22b1290dbd2756ef120cfbe154179aae35e1dfc579f8bfd574066105"}, - {file = "newrelic-9.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:53e860c6eacfdef879f23fbbf7d76d8bbb90b725a1c422f62439c6edfceebc21"}, - {file = "newrelic-9.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4caad3017cc978f3130fe2f3933f233c214a4850a595458b733282b3b7f7e886"}, - {file = "newrelic-9.3.0.tar.gz", hash = "sha256:c2dd685527433f6b6fbffe58f83852b46c24b9713ebb8ee7af647e04c2de3ee4"}, + {file = "newrelic-9.4.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:ed7a8ab3fb4425d7d55c44517f24f5259eab2045d4b24a21cf9439d9a6f53ffd"}, + {file = "newrelic-9.4.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:3d1253c67bc371f8eca386a8d96e0ae29861359ca5b62e7e5c4f87083b8a8930"}, + {file = "newrelic-9.4.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:04e055c3a4a9b2b2719bc83e5e2935f700f3943025d169873b8952b9576d3962"}, + {file = "newrelic-9.4.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1f28ef38aed097600e149755b4b102edcb18e9b4e270d415154699cec2cb1a05"}, + {file = "newrelic-9.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f177f27cfbcd3673359ce0d80f8e418fc706b019ba936bbba9aa08585dff5f0"}, + {file = "newrelic-9.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d3d4902431de420baf1c9801c17adb8d6accb01704a6206dcdbb3ab6cc83ca8"}, + {file = "newrelic-9.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:66df7709bc8da0a79aea34eaf3f38410eeed2b84abb53fcac78130a0f4fb7eb4"}, + {file = "newrelic-9.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:89329509f6c37f444eedd4a6abc8e569c0faa74e42538e31288e75610ae5fb4e"}, + {file = "newrelic-9.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ec7da405d968b4f31103d6db407e409ad1cda1403efb22862bdefdd44a9742a"}, + {file = "newrelic-9.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3183168cc1a7d79b2b0be147ea657105a83c631e33edef5a17c469052f9ae944"}, + {file = "newrelic-9.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:dcd592bb0115694ca4c8e4b9264ffc05af10c365dfd95c0b8bc10b89c03bb282"}, + {file = "newrelic-9.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0f74d88c1b279ffadae325ecebe35a3dab662ae074f868a03cfdc5be5214b3d3"}, + {file = "newrelic-9.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d61eb8972323d57919cefef8ba1faad325a7818939d00ee2bc9698f96a880ca8"}, + {file = "newrelic-9.4.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72267bf3c2ab493813d7f5fb084a722c52da1493b376c56ff1d6a637dc451bed"}, + {file = "newrelic-9.4.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:78567ccedf2bdb75dc567bec318e221dcfab4681bd05babc398ce1b78d60f67b"}, + {file = "newrelic-9.4.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:7a0fcbe0a581bea77346e291a0329fe7fce5226252c69d41fd4d91ba4d7c5493"}, + {file = "newrelic-9.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9162bf466d8ed7c973a597115434855f4e37888c2350d56b25f9b11875d20f2"}, + {file = "newrelic-9.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5d9e8f0f9ef0920dfad046e70dd91fcecab225d1ea5c09369a701c24e622c69"}, + {file = "newrelic-9.4.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6b63ad134842b92521845864cbc47a7559d189cf8a706220a90974ad2a9510da"}, + {file = "newrelic-9.4.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:895bfa0e1497dc061139b83dd4a5ff7b40b3eafa62a2e54c5bce2e616c72c762"}, + {file = "newrelic-9.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b40049de63700f518a9ee4e2b97881c5796e8a72fe9684bd0ae8e11d1ec17755"}, + {file = "newrelic-9.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eb1a8571d0434d62eac401797e835feed1b39a918434ab1e72e486b39bc0e87"}, + {file = "newrelic-9.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:195bc995b227ed0cdbe2c95dc27ae057002432a7c84532e72ba57a430265054a"}, + {file = "newrelic-9.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:895d0e78da2b3d5abbde7e8856692944ada2b744b26cdb339d5cbfa4461e9acb"}, + {file = "newrelic-9.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d11de77ba0e9e7921b21385f8300172248e865cd38c16165ee48adc9af35c746"}, + {file = "newrelic-9.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3f71b218febb7a48a8df048a7248025e1bd86c76a3144602e56d2a9f7d1740d"}, + {file = "newrelic-9.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f5cecccf3e85dccfa6b5ad7be21ae8940c46c579e2979890d84969546322d715"}, + {file = "newrelic-9.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f9fa697c355790b52e3180044349bbc2822230ca6f98d6292df4142080cd20de"}, + {file = "newrelic-9.4.0.tar.gz", hash = "sha256:84437107e0d47be070a17b31f48b54abea7d4951b5ca89f5c2416a2fa6ab42b8"}, ] [package.extras] @@ -1902,18 +1921,18 @@ pip = "*" [[package]] name = "pip-audit" -version = "2.6.2" +version = "2.6.3" description = "A tool for scanning Python environments for known vulnerabilities" optional = false python-versions = ">=3.8" files = [ - {file = "pip_audit-2.6.2-py3-none-any.whl", hash = "sha256:ac3a4b6e977ef2c574aa8d19a5d71d12201bdb65bba2d67d9df49f53f0be5e7d"}, - {file = "pip_audit-2.6.2.tar.gz", hash = "sha256:0bbd023a199a104b29f949f063a872d41113b5a9048285666820fa35a76a7794"}, + {file = "pip_audit-2.6.3-py3-none-any.whl", hash = "sha256:216983210db4a15393f9e80e4d24a805f5767e4c8e0c31fc70c336acc629613b"}, + {file = "pip_audit-2.6.3.tar.gz", hash = "sha256:bd796066f69684b2f4fc2c2b6d222589e23190db0bbde069cea5c2b0be2cc57d"}, ] [package.dependencies] CacheControl = {version = ">=0.13.0", extras = ["filecache"]} -cyclonedx-python-lib = ">=4,<6" +cyclonedx-python-lib = ">=5,<7" html5lib = ">=1.1" packaging = ">=23.0.0" pip-api = ">=0.0.28" @@ -1925,7 +1944,7 @@ toml = ">=0.10" [package.extras] dev = ["build", "bump (>=1.3.2)", "pip-audit[doc,lint,test]"] doc = ["pdoc"] -lint = ["interrogate", "mypy", "ruff (<0.1.9)", "types-html5lib", "types-requests", "types-toml"] +lint = ["interrogate", "mypy", "ruff (<0.1.12)", "types-html5lib", "types-requests", "types-toml"] test = ["coverage[toml] (>=7.0,!=7.3.3,<8.0)", "pretend", "pytest", "pytest-cov"] [[package]] @@ -2017,13 +2036,13 @@ virtualenv = ">=20.10.0" [[package]] name = "py-serializable" -version = "0.11.1" +version = "0.17.1" description = "Library for serializing and deserializing Python Objects to and from JSON and XML." optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "py-serializable-0.11.1.tar.gz", hash = "sha256:ba0e1287b9e4f645a5334f1913abd8e647e7250209f84f55dce3909498a6f586"}, - {file = "py_serializable-0.11.1-py3-none-any.whl", hash = "sha256:79e21f0672822e6200b15f45ce9f636e8126466f62dbd7d488c67313c72b5c3e"}, + {file = "py-serializable-0.17.1.tar.gz", hash = "sha256:875bb9c01df77f563dfcd1e75bb4244b5596083d3aad4ccd3fb63e1f5a9d3e5f"}, + {file = "py_serializable-0.17.1-py3-none-any.whl", hash = "sha256:389c2254d912bec3a44acdac667c947d73c59325050d5ae66386e1ed7108a45a"}, ] [package.dependencies] diff --git a/tests/app/main/views/test_manage_users.py b/tests/app/main/views/test_manage_users.py index a6877a142..9bdabf925 100644 --- a/tests/app/main/views/test_manage_users.py +++ b/tests/app/main/views/test_manage_users.py @@ -27,7 +27,7 @@ from tests.conftest import ( ( create_active_user_with_permissions(), ( - "Test User (you) " + "Test User(you) " "Permissions " "Can See dashboard " "Can Send messages " @@ -39,18 +39,18 @@ from tests.conftest import ( ), ( create_active_user_empty_permissions(), - ("Test User With Empty Permissions (you) " "Permissions"), + ("Test User With Empty Permissions(you) " "Permissions"), False, ), ( create_active_user_view_permissions(), - ("Test User With Permissions (you) " "Permissions " "Can See dashboard"), + ("Test User With Permissions(you) " "Permissions " "Can See dashboard"), False, ), ( create_active_user_manage_template_permissions(), ( - "Test User With Permissions (you) " + "Test User With Permissions(you) " "Permissions " "Can See dashboard " "Can Add and edit templates" @@ -232,7 +232,7 @@ 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) " "Permissions " "Can See dashboard" + "Test User With Permissions(you) " "Permissions " "Can See dashboard" ) # [1:5] are invited users assert normalize_spaces(page.select(".user-list-item")[6].text) == ( @@ -1240,7 +1240,7 @@ def test_cancel_invited_user_doesnt_work_if_user_not_invited_to_this_service( ( "pending", ( - "invited_user@test.gsa.gov (invited) " + "invited_user@test.gsa.gov(invited) " "Permissions " "Can See dashboard " "Can Send messages " @@ -1252,7 +1252,7 @@ def test_cancel_invited_user_doesnt_work_if_user_not_invited_to_this_service( ( "cancelled", ( - "invited_user@test.gsa.gov (cancelled invite) " + "invited_user@test.gsa.gov(cancelled invite) " "Permissions" # all permissions are greyed out ), @@ -1413,10 +1413,7 @@ def test_manage_user_page_shows_how_many_folders_user_can_view( user_div = page.select_one( "h2[title='notify@digital.cabinet-office.gov.uk']" ).parent - assert ( - user_div.select_one(".tick-cross-list-hint:last-child").text.strip() - == expected_message - ) + assert user_div.select_one(".tick-cross-list-hint").text.strip() == expected_message def test_manage_user_page_doesnt_show_folder_hint_if_service_has_no_folders(