|
1 | | -import { |
2 | | - inject, |
3 | | - async, |
4 | | - fakeAsync, |
5 | | - tick, |
6 | | - TestComponentBuilder, |
7 | | - ComponentFixture, |
8 | | - TestBed, |
9 | | -} from '@angular/core/testing'; |
| 1 | +import {async, fakeAsync, tick, ComponentFixture, TestBed} from '@angular/core/testing'; |
10 | 2 | import {MdTabGroup, MdTabsModule} from './tabs'; |
11 | 3 | import {Component} from '@angular/core'; |
12 | 4 | import {By} from '@angular/platform-browser'; |
13 | 5 | import {Observable} from 'rxjs/Observable'; |
14 | 6 |
|
15 | 7 |
|
16 | 8 | describe('MdTabGroup', () => { |
17 | | - let builder: TestComponentBuilder; |
18 | 9 |
|
19 | 10 | beforeEach(async(() => { |
20 | 11 | TestBed.configureTestingModule({ |
21 | 12 | imports: [MdTabsModule], |
22 | 13 | declarations: [ |
23 | 14 | SimpleTabsTestApp, |
24 | 15 | AsyncTabsTestApp, |
| 16 | + DisabledTabsTestApp |
25 | 17 | ], |
26 | 18 | }); |
27 | 19 |
|
28 | 20 | TestBed.compileComponents(); |
29 | 21 | })); |
30 | 22 |
|
31 | | - beforeEach(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => { |
32 | | - builder = tcb; |
33 | | - })); |
34 | | - |
35 | 23 | describe('basic behavior', () => { |
36 | 24 | let fixture: ComponentFixture<SimpleTabsTestApp>; |
37 | 25 |
|
38 | 26 | beforeEach(async(() => { |
39 | | - builder.createAsync(SimpleTabsTestApp).then(f => { |
40 | | - fixture = f; |
41 | | - }); |
| 27 | + fixture = TestBed.createComponent(SimpleTabsTestApp); |
42 | 28 | })); |
43 | 29 |
|
44 | 30 | it('should default to the first tab', async(() => { |
@@ -155,10 +141,8 @@ describe('MdTabGroup', () => { |
155 | 141 | let fixture: ComponentFixture<DisabledTabsTestApp>; |
156 | 142 |
|
157 | 143 | beforeEach(async(() => { |
158 | | - builder.createAsync(DisabledTabsTestApp).then(f => { |
159 | | - fixture = f; |
160 | | - fixture.detectChanges(); |
161 | | - }); |
| 144 | + fixture = TestBed.createComponent(DisabledTabsTestApp); |
| 145 | + fixture.detectChanges(); |
162 | 146 | })); |
163 | 147 |
|
164 | 148 | it('should disable the second tab', () => { |
|
0 commit comments