Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 047b733

Browse files
josephperrottjelbourn
authored andcommitted
Fix tests: (#245)
- Add BrowserAnimationsModule to sidenav - Add FormsModule and MdSlideToggleModule to TestExampleViewerModule
1 parent 9826360 commit 047b733

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/app/pages/component-sidenav/component-sidenav.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {Component, NgZone, ViewEncapsulation, ViewChild, OnInit, NgModule} from '@angular/core';
22
import {DocumentationItems} from '../../shared/documentation-items/documentation-items';
33
import {MdSidenav, MdSidenavModule} from '@angular/material';
4+
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
45
import {Router, RouterModule} from '@angular/router';
56
import {CommonModule} from '@angular/common';
67
import {ComponentHeaderModule} from '../component-page-header/component-page-header';
@@ -41,7 +42,14 @@ export class ComponentSidenav implements OnInit {
4142

4243

4344
@NgModule({
44-
imports: [MdSidenavModule, RouterModule, CommonModule, ComponentHeaderModule, FooterModule],
45+
imports: [
46+
MdSidenavModule,
47+
RouterModule,
48+
CommonModule,
49+
ComponentHeaderModule,
50+
FooterModule,
51+
BrowserAnimationsModule
52+
],
4553
exports: [ComponentSidenav],
4654
declarations: [ComponentSidenav],
4755
providers: [DocumentationItems],

src/app/shared/example-viewer/example-viewer.spec.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import {EXAMPLE_COMPONENTS} from '@angular/material-examples';
55
import {ExampleViewer} from './example-viewer';
66
import {DocsAppTestingModule} from '../../testing/testing-module';
77
import {DocViewerModule} from '../doc-viewer/doc-viewer-module';
8-
import {MdAutocompleteModule, MdInputModule} from '@angular/material';
8+
import {FormsModule} from '@angular/forms';
99
import {NgModule} from '@angular/core';
1010
import {CommonModule} from '@angular/common';
1111
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
12+
import {
13+
MdAutocompleteModule,
14+
MdInputModule,
15+
MdSlideToggleModule
16+
} from '@angular/material';
1217

1318
const exampleKey = 'autocomplete-overview';
1419

@@ -75,12 +80,14 @@ describe('ExampleViewer', () => {
7580
});
7681

7782

78-
// Create a version of ExampleModule for testing with only one component so that we odn't have
83+
// Create a version of ExampleModule for testing with only one component so that we don't have
7984
// to compile all of the examples for these tests.
8085
@NgModule({
8186
imports: [
8287
MdInputModule,
8388
MdAutocompleteModule,
89+
MdSlideToggleModule,
90+
FormsModule,
8491
CommonModule,
8592
ReactiveFormsModule,
8693
NoopAnimationsModule

0 commit comments

Comments
 (0)