mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-21 05:32:44 -04:00
PR changes
This commit is contained in:
@@ -658,4 +658,40 @@ describe('Collapsible fieldset', () => {
|
||||
|
||||
});
|
||||
|
||||
describe("When there is no hint element", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
document.body.innerHTML =
|
||||
`<div class="selection-wrapper" data-module="collapsible-checkboxes" data-field-label="folder">
|
||||
<div class="usa-form-group">
|
||||
<fieldset class="usa-fieldset" id="folder_permissions">
|
||||
<legend class="usa-fieldset__legend usa-fieldset__legend--s">
|
||||
Folders this team member can see
|
||||
<span class="selection-summary" role="region" aria-live="polite"></span>
|
||||
</legend>
|
||||
<ul class="usa-checkbox-group">
|
||||
${_checkboxes(1, 3)}
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
wrapper = document.querySelector('.selection-wrapper');
|
||||
formGroup = wrapper.querySelector('.usa-form-group');
|
||||
|
||||
window.NotifyModules.start();
|
||||
|
||||
});
|
||||
|
||||
test("should initialize without errors", () => {
|
||||
|
||||
const summary = formGroup.querySelector('.selection-summary');
|
||||
expect(summary).not.toBeNull();
|
||||
expect(summary.querySelector('.selection-summary__text')).not.toBeNull();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -283,13 +283,13 @@ describe('Live search', () => {
|
||||
const users = [
|
||||
{
|
||||
"label": "Template editor",
|
||||
"email": "template-editor@nhs.uk",
|
||||
"email": "template-editor@example.gov",
|
||||
"permissions" : ["Add and edit templates"],
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"label": "Administrator",
|
||||
"email": "admin@nhs.uk",
|
||||
"email": "admin@example.gov",
|
||||
"permissions" : ["Send messages", "Add and edit templates", "Manage settings, team and usage", "API integration"],
|
||||
"checked": false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user