mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
finished dynamic menus
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { NavbarEffects } from './navbar.effects';
|
||||
import { NavbarCollapseAction } from './navbar.actions';
|
||||
import { HostWindowResizeAction } from '../shared/host-window.actions';
|
||||
import { Observable } from 'rxjs';
|
||||
import { provideMockActions } from '@ngrx/effects/testing';
|
||||
import { cold, hot } from 'jasmine-marbles';
|
||||
import * as fromRouter from '@ngrx/router-store';
|
||||
import { CollapseMenuAction } from '../shared/menu/menu.actions';
|
||||
import { MenuID } from '../shared/menu/initial-menus-state';
|
||||
|
||||
describe('NavbarEffects', () => {
|
||||
let navbarEffects: NavbarEffects;
|
||||
@@ -28,7 +29,7 @@ describe('NavbarEffects', () => {
|
||||
it('should return a COLLAPSE action in response to a RESIZE action', () => {
|
||||
actions = hot('--a-', { a: new HostWindowResizeAction(800, 600) });
|
||||
|
||||
const expected = cold('--b-', { b: new NavbarCollapseAction() });
|
||||
const expected = cold('--b-', { b: new CollapseMenuAction(MenuID.PUBLIC) });
|
||||
|
||||
expect(navbarEffects.resize$).toBeObservable(expected);
|
||||
});
|
||||
@@ -40,7 +41,7 @@ describe('NavbarEffects', () => {
|
||||
it('should return a COLLAPSE action in response to an UPDATE_LOCATION action', () => {
|
||||
actions = hot('--a-', { a: { type: fromRouter.ROUTER_NAVIGATION } });
|
||||
|
||||
const expected = cold('--b-', { b: new NavbarCollapseAction() });
|
||||
const expected = cold('--b-', { b: new CollapseMenuAction(MenuID.PUBLIC) });
|
||||
|
||||
expect(navbarEffects.routeChange$).toBeObservable(expected);
|
||||
});
|
||||
|
Reference in New Issue
Block a user