Created
January 19, 2023 04:58
-
-
Save YonatanKra/c1f9acbd03d942eda8b7533a0078e7ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('expandmode', () => { | |
it('should allow one accordion items open when set to “single”', async () => { | |
element.expandedmode = ‘single’; | |
expect(accordionItem1.open).toBeFalsy(); | |
expect(accordionItem2.open).toBeFalsy(); | |
accordionItem1.open = true; | |
accordionItem2.open = true; | |
expect(accordionItem1.open).toBeFalsy(); | |
expect(accordionItem2.open).toBeTruthy(); | |
}); | |
it('should allow multiple items to open when set to “multi”', async () => { | |
element.expandmode = 'multi'; | |
expect(accordionItem1.expanded).toBeTruthy(); | |
expect(accordionItem2.expanded).toBeFalsy(); | |
accordionItem1.expanded = true; | |
accordionItem2.expanded = true; | |
expect(accordionItem1.expanded).toBeTruthy(); | |
expect(accordionItem2.expanded).toBeTruthy(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment