Skip to content

Commit e0ed4b8

Browse files
committed
change tags name
1 parent 31e89a6 commit e0ed4b8

File tree

5 files changed

+42
-9
lines changed

5 files changed

+42
-9
lines changed

src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ describe('GettingStartedComponent', () => {
3535
const { app, fixture } = setup();
3636
fixture.detectChanges();
3737
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!');
4040
}));
4141

4242

src/app/components/options-sidebar/reports/reports.component.spec.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ describe('ReportsComponent', () => {
66
let component: ReportsComponent;
77
let fixture: ComponentFixture<ReportsComponent>;
88

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+
916
beforeEach(async(() => {
1017
TestBed.configureTestingModule({
1118
declarations: [ ReportsComponent ]
@@ -19,7 +26,17 @@ describe('ReportsComponent', () => {
1926
fixture.detectChanges();
2027
});
2128

22-
it('should create', () => {
29+
it('should be created', () => {
2330
expect(component).toBeTruthy();
2431
});
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+
});

src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ describe('TimeClockComponent', () => {
3535
const { app, fixture } = setup();
3636
fixture.detectChanges();
3737
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!');
4040
}));
4141

4242
});

src/app/components/options-sidebar/time-entries/time-entries.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ describe('TimeEntriesComponent', () => {
3535
const { app, fixture } = setup();
3636
fixture.detectChanges();
3737
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!');
4040
}));
4141

4242
});

src/app/components/options-sidebar/time-off/time-off.component.spec.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ describe('TimeOffComponent', () => {
66
let component: TimeOffComponent;
77
let fixture: ComponentFixture<TimeOffComponent>;
88

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+
916
beforeEach(async(() => {
1017
TestBed.configureTestingModule({
1118
declarations: [ TimeOffComponent ]
@@ -19,7 +26,16 @@ describe('TimeOffComponent', () => {
1926
fixture.detectChanges();
2027
});
2128

22-
it('should create', () => {
29+
it('should be created', () => {
2330
expect(component).toBeTruthy();
2431
});
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+
}));
2541
});

0 commit comments

Comments
 (0)