Skip to content

Commit c6490a4

Browse files
kdinevCopilot
andauthored
Update projects/igniteui-angular-extras/src/lib/context-menu/context-menu.component.spec.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f43322d commit c6490a4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

projects/igniteui-angular-extras/src/lib/context-menu/context-menu.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,11 @@ describe('IgxContextMenuComponent', () => {
286286

287287
// The closing event checks instanceof IgxChartMenuComponent — we mock at the overlay level
288288
(mockOverlay.closing as Subject<any>).next({
289-
componentRef: { instance: component }
289+
componentRef: { instance: mockInstance }
290290
});
291291

292-
// Since the instance is not actually IgxChartMenuComponent, tabsMenu.open should not be called
293-
expect(mockTabsMenu.open).not.toHaveBeenCalled();
292+
// When the closed component looks like an IgxChartMenuComponent and _dialogId is set, tabsMenu.open should be called
293+
expect(mockTabsMenu.open).toHaveBeenCalled();
294294
});
295295

296296
it('should not open tabsMenu when closing event has no componentRef', () => {

0 commit comments

Comments
 (0)