forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aio): add marketing class to AppComponent <aio-shell> on mkt page (
angular#16395) Also navigation.json Doc page should be hidden in sidebar, shown in top
- Loading branch information
1 parent
782683d
commit 4dcbfcc
Showing
4 changed files
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,7 @@ | |
}, | ||
{ | ||
"url": "docs", | ||
"title": "Docs", | ||
"hidden": true | ||
"title": "Docs" | ||
}, | ||
{ | ||
"url": "resources", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,15 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; | ||
|
||
import { NavMenuComponent } from './nav-menu.component'; | ||
import { NavigationNode } from 'app/navigation/navigation.service'; | ||
|
||
// Testing the component class behaviors, independent of its template | ||
// No dependencies, no life-cycle hooks. Just new it and test :) | ||
// Let e2e tests verify how it displays. | ||
describe('NavMenuComponent', () => { | ||
let component: NavMenuComponent; | ||
let fixture: ComponentFixture<NavMenuComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ NavMenuComponent ], | ||
schemas: [CUSTOM_ELEMENTS_SCHEMA] | ||
}); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(NavMenuComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
it('should filter out hidden nodes', () => { | ||
const component = new NavMenuComponent(); | ||
const nodes: NavigationNode[] = | ||
[ { title: 'a' }, { title: 'b', hidden: 'true'}, { title: 'c'} ]; | ||
component.nodes = nodes; | ||
expect(component.filteredNodes).toEqual([ nodes[0], nodes[2] ]); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
|
||
// TODO: Add TestHostComponent and tests. | ||
}); |