2 * # ============LICENSE_START=======================================================
3 * # Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
4 * # ================================================================================
5 * # Licensed under the Apache License, Version 2.0 (the "License");
6 * # you may not use this file except in compliance with the License.
7 * # You may obtain a copy of the License at
9 * # http://www.apache.org/licenses/LICENSE-2.0
11 * # Unless required by applicable law or agreed to in writing, software
12 * # distributed under the License is distributed on an "AS IS" BASIS,
13 * # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * # See the License for the specific language governing permissions and
15 * # limitations under the License.
16 * # ============LICENSE_END=========================================================
19 import { TestBed, async } from '@angular/core/testing';
20 import { RouterTestingModule } from '@angular/router/testing';
21 import { AppComponent } from './app.component';
22 import { Ng4LoadingSpinnerModule } from 'ng4-loading-spinner';
23 import { MatSidenavModule } from '@angular/material/sidenav';
24 import { MatToolbarModule } from '@angular/material/toolbar';
25 import { MatCardModule } from '@angular/material/card';
26 import { MatTreeModule } from '@angular/material/tree';
27 import { DialogModule } from 'primeng/dialog';
28 import { MatListModule } from '@angular/material/list';
29 import { LoginComponent } from './login/login.component';
30 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
31 import { CardModule } from 'primeng/card';
32 import { HttpClientTestingModule } from '@angular/common/http/testing';
33 import { JwtHelperService, JwtModule, JWT_OPTIONS } from '@auth0/angular-jwt';
35 describe('AppComponent', () => {
36 beforeEach(async(() => {
37 TestBed.configureTestingModule({
40 Ng4LoadingSpinnerModule,
50 HttpClientTestingModule,
57 { provide: JWT_OPTIONS, useValue: JWT_OPTIONS },
60 }).compileComponents();
63 it('should create the app', () => {
64 const fixture = TestBed.createComponent(AppComponent);
65 const app = fixture.debugElement.componentInstance;
66 expect(app).toBeTruthy();
69 it(`should have as title 'mod-fe'`, () => {
70 const fixture = TestBed.createComponent(AppComponent);
71 const app = fixture.debugElement.componentInstance;
72 expect(app.title).toEqual('mod-fe');
75 it(`should have menu item variables as 'false'`, () => {
76 const fixture = TestBed.createComponent(AppComponent);
77 const app = fixture.debugElement.componentInstance;
78 expect(app.showUtilitiesMenu).toEqual(false);
79 expect(app.utilitiesMenuIconRight).toEqual(true);
82 it(`should change utilites menu arrow`, () => {
83 const fixture = TestBed.createComponent(AppComponent);
84 const app = fixture.debugElement.componentInstance;
87 expect(app.showUtilitiesMenu).toEqual(true);
88 expect(app.utilitiesMenuIconRight).toEqual(false);