File tree Expand file tree Collapse file tree 5 files changed +42
-9
lines changed Expand file tree Collapse file tree 5 files changed +42
-9
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ describe('GettingStartedComponent', () => {
35
35
const { app, fixture } = setup ( ) ;
36
36
fixture . detectChanges ( ) ;
37
37
const compile = fixture . debugElement . nativeElement ;
38
- const h1tag = compile . querySelector ( 'p' ) ;
39
- expect ( h1tag . textContent ) . toBe ( 'getting-started works!' ) ;
38
+ const ptag = compile . querySelector ( 'p' ) ;
39
+ expect ( ptag . textContent ) . toBe ( 'getting-started works!' ) ;
40
40
} ) ) ;
41
41
42
42
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ describe('ReportsComponent', () => {
6
6
let component : ReportsComponent ;
7
7
let fixture : ComponentFixture < ReportsComponent > ;
8
8
9
+ function setup ( ) {
10
+ // tslint:disable-next-line: no-shadowed-variable
11
+ const fixture = TestBed . createComponent ( ReportsComponent ) ;
12
+ const app = fixture . debugElement . componentInstance ;
13
+ return { fixture, app } ;
14
+ }
15
+
9
16
beforeEach ( async ( ( ) => {
10
17
TestBed . configureTestingModule ( {
11
18
declarations : [ ReportsComponent ]
@@ -19,7 +26,17 @@ describe('ReportsComponent', () => {
19
26
fixture . detectChanges ( ) ;
20
27
} ) ;
21
28
22
- it ( 'should create ' , ( ) => {
29
+ it ( 'should be created ' , ( ) => {
23
30
expect ( component ) . toBeTruthy ( ) ;
24
31
} ) ;
25
- } ) ;
32
+
33
+ it ( 'should have p tag as \'reports works!\'' , async ( ( ) => {
34
+ // tslint:disable-next-line: no-shadowed-variable
35
+ const { app, fixture } = setup ( ) ;
36
+ fixture . detectChanges ( ) ;
37
+ const compile = fixture . debugElement . nativeElement ;
38
+ const ptag = compile . querySelector ( 'p' ) ;
39
+ expect ( ptag . textContent ) . toBe ( 'reports works!' ) ;
40
+ } ) ) ;
41
+
42
+ } ) ;
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ describe('TimeClockComponent', () => {
35
35
const { app, fixture } = setup ( ) ;
36
36
fixture . detectChanges ( ) ;
37
37
const compile = fixture . debugElement . nativeElement ;
38
- const h1tag = compile . querySelector ( 'p' ) ;
39
- expect ( h1tag . textContent ) . toBe ( 'time-clock works!' ) ;
38
+ const ptag = compile . querySelector ( 'p' ) ;
39
+ expect ( ptag . textContent ) . toBe ( 'time-clock works!' ) ;
40
40
} ) ) ;
41
41
42
42
} ) ;
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ describe('TimeEntriesComponent', () => {
35
35
const { app, fixture } = setup ( ) ;
36
36
fixture . detectChanges ( ) ;
37
37
const compile = fixture . debugElement . nativeElement ;
38
- const h1tag = compile . querySelector ( 'p' ) ;
39
- expect ( h1tag . textContent ) . toBe ( 'time-entries works!' ) ;
38
+ const ptag = compile . querySelector ( 'p' ) ;
39
+ expect ( ptag . textContent ) . toBe ( 'time-entries works!' ) ;
40
40
} ) ) ;
41
41
42
42
} ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ describe('TimeOffComponent', () => {
6
6
let component : TimeOffComponent ;
7
7
let fixture : ComponentFixture < TimeOffComponent > ;
8
8
9
+ function setup ( ) {
10
+ // tslint:disable-next-line: no-shadowed-variable
11
+ const fixture = TestBed . createComponent ( TimeOffComponent ) ;
12
+ const app = fixture . debugElement . componentInstance ;
13
+ return { fixture, app } ;
14
+ }
15
+
9
16
beforeEach ( async ( ( ) => {
10
17
TestBed . configureTestingModule ( {
11
18
declarations : [ TimeOffComponent ]
@@ -19,7 +26,16 @@ describe('TimeOffComponent', () => {
19
26
fixture . detectChanges ( ) ;
20
27
} ) ;
21
28
22
- it ( 'should create ' , ( ) => {
29
+ it ( 'should be created ' , ( ) => {
23
30
expect ( component ) . toBeTruthy ( ) ;
24
31
} ) ;
32
+
33
+ it ( 'should have p tag as \'time-off works!\'' , async ( ( ) => {
34
+ // tslint:disable-next-line: no-shadowed-variable
35
+ const { app, fixture } = setup ( ) ;
36
+ fixture . detectChanges ( ) ;
37
+ const compile = fixture . debugElement . nativeElement ;
38
+ const ptag = compile . querySelector ( 'p' ) ;
39
+ expect ( ptag . textContent ) . toBe ( 'time-off works!' ) ;
40
+ } ) ) ;
25
41
} ) ;
You can’t perform that action at this time.
0 commit comments