diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts deleted file mode 100644 index b18bdaf..0000000 --- a/src/app/app.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [AppComponent], - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it(`should have the 'hotel-manager' title`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('hotel-manager'); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain( - 'Hello, hotel-manager', - ); - }); -}); diff --git a/src/app/hotel/component/hotels.component.ts b/src/app/hotel/component/hotels.component.ts index 46160e9..1f604ac 100644 --- a/src/app/hotel/component/hotels.component.ts +++ b/src/app/hotel/component/hotels.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectionStrategy, Component, inject} from '@angular/core'; +import {ChangeDetectionStrategy, Component, inject, ViewChild, ViewContainerRef} from '@angular/core'; import {HotelComponent} from './hotel.component'; import {Hotel} from '../model/hotel'; import {FormsModule} from '@angular/forms'; @@ -38,6 +38,12 @@ import {StarComponent} from './star.component'; } @empty {