mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-19 20:52:32 -04:00
labeling admin users and jest test
This commit is contained in:
@@ -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