Resubida app de ejemplo, la anterior no logueaba.

This commit is contained in:
Eneko Nieto
2021-01-20 10:38:04 +01:00
parent 88949dbadf
commit a70f652221
35 changed files with 1762 additions and 1163 deletions

View File

@@ -1,35 +1,28 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { AppModule } from './app.module';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [AppModule]
}).compileComponents();
});
}));
it('should create the app', () => {
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
}));
it(`should have as title 'okupamicoche-angular'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('okupamicoche-angular');
});
it('should render title', () => {
it('should render link to flight in a a tag', async(() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('okupamicoche-angular app is running!');
});
const compiled = fixture.debugElement.nativeElement;
console.log(compiled);
expect(compiled.querySelectorAll(' li a')[2].textContent).toContain(
'Book a Flight'
);
}));
});