mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
labeling admin users and jest test
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
{% if current_service.all_template_folders %}
|
||||
<p class="usa-body tick-cross-list-hint">
|
||||
{% if user.platform_admin %}
|
||||
Platform admin - sees all folders
|
||||
Platform admin can see all folders
|
||||
{% else %}
|
||||
{% set folder_count = user.template_folders_for_service(current_service) | length %}
|
||||
{% if folder_count == 0 %}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{% if current_user.has_permissions(ServicePermission.MANAGE_SERVICE) and form.users_with_permission.all_service_users %}
|
||||
{{ form.users_with_permission }}
|
||||
{% if form.platform_admins is defined and form.platform_admins %}
|
||||
<p class="usa-hint">Platform administrators can see all folders and cannot be removed from folders:</p>
|
||||
<p class="usa-hint">Platform admin can see all folders:</p>
|
||||
<ul class="usa-hint usa-list">
|
||||
{% for admin in form.platform_admins %}
|
||||
<li>{{ admin.name }}</li>
|
||||
|
||||
@@ -429,6 +429,36 @@ describe('Collapsible fieldset', () => {
|
||||
expect(toggleButton.parentElement.style.display).toEqual('none');
|
||||
});
|
||||
|
||||
test("clicking 'Select all' does not collapse the fieldset", () => {
|
||||
const toggleButton = document.querySelector('.usa-button--small');
|
||||
const doneButton = formGroup.querySelector('.selection-footer__button');
|
||||
|
||||
expect(helpers.element(fieldset).is('hidden')).toBe(false);
|
||||
expect(doneButton.getAttribute('aria-expanded')).toEqual('true');
|
||||
|
||||
helpers.triggerEvent(toggleButton, 'click');
|
||||
|
||||
expect(helpers.element(fieldset).is('hidden')).toBe(false);
|
||||
expect(doneButton.getAttribute('aria-expanded')).toEqual('true');
|
||||
expect(doneButton.textContent.trim()).toEqual("Done choosing folders");
|
||||
});
|
||||
|
||||
test("clicking 'Deselect all' does not collapse the fieldset", () => {
|
||||
const toggleButton = document.querySelector('.usa-button--small');
|
||||
const doneButton = formGroup.querySelector('.selection-footer__button');
|
||||
|
||||
helpers.triggerEvent(toggleButton, 'click');
|
||||
|
||||
expect(helpers.element(fieldset).is('hidden')).toBe(false);
|
||||
expect(doneButton.getAttribute('aria-expanded')).toEqual('true');
|
||||
|
||||
helpers.triggerEvent(toggleButton, 'click');
|
||||
|
||||
expect(helpers.element(fieldset).is('hidden')).toBe(false);
|
||||
expect(doneButton.getAttribute('aria-expanded')).toEqual('true');
|
||||
expect(doneButton.textContent.trim()).toEqual("Done choosing folders");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe("toggle button visibility on re-expansion", () => {
|
||||
|
||||
Reference in New Issue
Block a user