mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 10:54:11 -04:00
Add a hint when no team members are selected
This helps clarify that you will still be able to see the folder. Follows the phrasing used for the "No folders…" message.
This commit is contained in:
@@ -205,7 +205,7 @@ describe('Collapsible fieldset', () => {
|
||||
});
|
||||
|
||||
test("the summary doesn't have a folder icon if fields aren't called 'folder'", () => {
|
||||
|
||||
|
||||
formGroup.dataset.fieldLabel = 'team member';
|
||||
|
||||
// start module
|
||||
@@ -361,7 +361,27 @@ describe('Collapsible fieldset', () => {
|
||||
// click the first checkbox
|
||||
helpers.triggerEvent(checkboxes[0], 'click');
|
||||
|
||||
expect(summaryText.textContent).toEqual("No team members");
|
||||
expect(summaryText.textContent).toEqual("No team members (only you)");
|
||||
|
||||
});
|
||||
|
||||
test("if fields are called 'arbitrary thing'", () => {
|
||||
|
||||
formGroup.dataset.fieldLabel = 'arbitrary thing';
|
||||
|
||||
checkFirstCheckbox();
|
||||
|
||||
// start module
|
||||
window.GOVUK.modules.start();
|
||||
|
||||
showCheckboxes();
|
||||
|
||||
const summaryText = document.querySelector('.selection-summary__text');
|
||||
|
||||
// click the first checkbox
|
||||
helpers.triggerEvent(checkboxes[0], 'click');
|
||||
|
||||
expect(summaryText.textContent).toEqual("No arbitrary things");
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user