Skip to content
Prev Previous commit
Next Next commit
change tags name
  • Loading branch information
daros10 committed Mar 17, 2020
commit e0ed4b8036ba5f5e4293474e5c8699d0329d9b41
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('GettingStartedComponent', () => {
const { app, fixture } = setup();
fixture.detectChanges();
const compile = fixture.debugElement.nativeElement;
const h1tag = compile.querySelector('p');
expect(h1tag.textContent).toBe('getting-started works!');
const ptag = compile.querySelector('p');
expect(ptag.textContent).toBe('getting-started works!');
}));


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ describe('ReportsComponent', () => {
let component: ReportsComponent;
let fixture: ComponentFixture<ReportsComponent>;

function setup() {
// tslint:disable-next-line: no-shadowed-variable
const fixture = TestBed.createComponent(ReportsComponent);
const app = fixture.debugElement.componentInstance;
return { fixture, app };
}

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ReportsComponent ]
Expand All @@ -19,7 +26,17 @@ describe('ReportsComponent', () => {
fixture.detectChanges();
});

it('should create', () => {
it('should be created', () => {
expect(component).toBeTruthy();
});
});

it('should have p tag as \'reports works!\'', async(() => {
// tslint:disable-next-line: no-shadowed-variable
const { app, fixture } = setup();
fixture.detectChanges();
const compile = fixture.debugElement.nativeElement;
const ptag = compile.querySelector('p');
expect(ptag.textContent).toBe('reports works!');
}));

});
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('TimeClockComponent', () => {
const { app, fixture } = setup();
fixture.detectChanges();
const compile = fixture.debugElement.nativeElement;
const h1tag = compile.querySelector('p');
expect(h1tag.textContent).toBe('time-clock works!');
const ptag = compile.querySelector('p');
expect(ptag.textContent).toBe('time-clock works!');
}));

});
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('TimeEntriesComponent', () => {
const { app, fixture } = setup();
fixture.detectChanges();
const compile = fixture.debugElement.nativeElement;
const h1tag = compile.querySelector('p');
expect(h1tag.textContent).toBe('time-entries works!');
const ptag = compile.querySelector('p');
expect(ptag.textContent).toBe('time-entries works!');
}));

});
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ describe('TimeOffComponent', () => {
let component: TimeOffComponent;
let fixture: ComponentFixture<TimeOffComponent>;

function setup() {
// tslint:disable-next-line: no-shadowed-variable
const fixture = TestBed.createComponent(TimeOffComponent);
const app = fixture.debugElement.componentInstance;
return { fixture, app };
}

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TimeOffComponent ]
Expand All @@ -19,7 +26,16 @@ describe('TimeOffComponent', () => {
fixture.detectChanges();
});

it('should create', () => {
it('should be created', () => {
expect(component).toBeTruthy();
});

it('should have p tag as \'time-off works!\'', async(() => {
// tslint:disable-next-line: no-shadowed-variable
const { app, fixture } = setup();
fixture.detectChanges();
const compile = fixture.debugElement.nativeElement;
const ptag = compile.querySelector('p');
expect(ptag.textContent).toBe('time-off works!');
}));
});