Skip to content

Commit d7a27d0

Browse files
committed
refactor(ui-top-nav-bar): fix failing test
1 parent 89ea2f4 commit d7a27d0

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/ui-top-nav-bar/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/__new-tests__/TopNavBarSmallViewportLayout.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ describe('<TopNavBarSmallViewportLayout />', () => {
442442
})
443443

444444
describe('items with "customPopoverConfig" prop', () => {
445-
it.skip('should render content of "customPopoverConfig" prop in the dropdown menu', async () => {
445+
it('should render content of "customPopoverConfig" prop in the dropdown menu', async () => {
446446
render(
447447
<SmallViewportModeWrapper>
448448
<TopNavBarSmallViewportLayout

packages/ui-top-nav-bar/src/TopNavBar/utils/mapItemsForDrilldown.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ import React, { Children } from 'react'
2626

2727
import { warn } from '@instructure/console'
2828
import { generateId } from '@instructure/ui-utils'
29-
import {
30-
matchComponentTypes,
31-
generateInstanceCounterMap
32-
} from '@instructure/ui-react-utils'
29+
import { matchComponentTypes } from '@instructure/ui-react-utils'
3330

3431
import { Drilldown } from '@instructure/ui-drilldown'
3532
import type {
@@ -62,7 +59,7 @@ const mapItemsForDrilldown = (
6259
const submenus: ItemMappedForDrilldownOption[] = []
6360
const { currentPageId, renderOptionContent } = options
6461

65-
const customPopoverIdMap = generateInstanceCounterMap()
62+
const customPopoverIdMap = new Map<string, number>()
6663

6764
Children.forEach(itemList, (item) => {
6865
if (!item || !matchComponentTypes(item, [TopNavBarItem])) return

0 commit comments

Comments
 (0)