blob: 57b9fa1a069cb469ba280f2864fab92c2e21f033 [file] [log] [blame]
/*********************************************************************
* Copyright (c) 2021 Boeing
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Boeing - initial API and implementation
**********************************************************************/
import { Component } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { MatIconModule } from '@angular/material/icon';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import { NavContainerComponent } from './layout/lib/containers/nav-container.component';
@Component({
selector: 'osee-display-user',
template: '<p>Mock Component</p>',
standalone: true,
imports: [
RouterTestingModule,
MatSidenavModule,
MatIconModule,
MatToolbarModule,
NavContainerComponent,
],
})
class MockOseeUserComponent {}
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule,
MatSidenavModule,
NoopAnimationsModule,
MatIconModule,
MatToolbarModule,
NavContainerComponent,
MockOseeUserComponent,
AppComponent,
],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'OSEE'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('OSEE');
});
// it('should render title', () => {
// const fixture = TestBed.createComponent(AppComponent);
// fixture.detectChanges();
// const compiled = fixture.nativeElement;
// expect(compiled.querySelector('.content span').textContent).toContain('modern-ple app is running!');
// });
});