Created
January 19, 2023 04:47
-
-
Save YonatanKra/bd9c6305ab984a133c9ea2cc61ef4802 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('non multi', () => { | |
it('should only allow one accordion items open at a time', async () => { | |
expect(accordionItem1.open).toBeFalsy(); | |
expect(accordionItem2.open).toBeFalsy(); | |
accordionItem1.open = true; | |
accordionItem2.open = true; | |
expect(accordionItem1.open).toBeFalsy(); | |
expect(accordionItem2.open).toBeTruthy(); | |
}); | |
}); | |
describe('multi', () => { | |
it('should allow all accordion items open when 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