diff --git a/src/lib/menu/menu-foundation.ts b/src/lib/menu/menu-foundation.ts index 74c4c139a..a55011c6d 100644 --- a/src/lib/menu/menu-foundation.ts +++ b/src/lib/menu/menu-foundation.ts @@ -362,6 +362,7 @@ export class MenuFoundation extends CascadingListDropdownAwareFoundation { + return [ + { icon: 'code', value: '', label: '1' }, + { leadingIcon: 'code', value: '', label: '2' } + ]; + } + + await tick(); + + this.context.component.options = options; + this.context.component.open = true; + + await tick(); + + const list = getPopupList(getPopupElement()); + const listItems = Array.from(list.querySelectorAll(LIST_ITEM_CONSTANTS.elementName)) as IListItemComponent[]; + const leadingIcons = listItems.map(listItem => listItem.querySelector('i[slot=leading]')); + + expect(leadingIcons[0]).toBeTruthy(); + expect(leadingIcons[1]).toBeTruthy(); + }); }); describe(`events`, function(this: ITestContext) {