Skip to content

Commit

Permalink
test: adds a test for nested items
Browse files Browse the repository at this point in the history
  • Loading branch information
iOvergaard committed Jul 25, 2024
1 parent 03d22c1 commit e9d7965
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/uui-menu-item/lib/uui-menu-item.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ describe('UUIMenuItemElement', () => {
await expect(element).shadowDom.to.be.accessible();
});

it('passes the a11y audit with nesting', async () => {
element = await fixture(
html`<uui-menu-item label="menuitem" has-children>
<uui-menu-item label="sub-menuitem"></uui-menu-item>
<uui-menu-item label="sub-menuitem"></uui-menu-item>
</uui-menu-item>`,
);
await expect(element).shadowDom.to.be.accessible();
});

describe('properties', () => {
it('has a disabled property', () => {
expect(element).to.have.property('disabled');
Expand Down

0 comments on commit e9d7965

Please sign in to comment.