2 // ============LICENSE_START====================================================
3 // Copyright (c) 2018 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======================================================
18 // ECOMP is a trademark and service mark of AT&T Intellectual Property.
19 import { NgModule } from '@angular/core';
20 import { BrowserModule } from '@angular/platform-browser';
21 import {HttpModule} from '@angular/http'; // for future
22 import {FormsModule, ReactiveFormsModule} from '@angular/forms'; // for future
23 import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; // for future
24 import { MaterialModule } from '@angular/material';
25 import { FlexLayoutModule } from '@angular/flex-layout';
26 import { RouterModule, Routes } from '@angular/router';
27 import { APP_BASE_HREF } from '@angular/common';
31 import { AppComponent } from './app.component';
32 import { DFSchemaComponent } from './df-schema.component';
33 import { DFJSONInputComponent } from './df-jsoninput.component';
34 import { DFControlComponent } from './df-control.component';
35 import {ValidateMetaSchemaService} from './validate-metaschema.service';
36 import {ValidateJSONService} from './validate-json.service';
37 import {MetaSchemaService} from './metaschema.service';
39 const dfroutes: Routes = [
40 { path: '', redirectTo: 'schemaval', pathMatch: 'full' },
41 { path: 'schemaval', component: DFSchemaComponent },
42 { path: 'jsoninput', component: DFJSONInputComponent },
46 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
47 import { By } from '@angular/platform-browser';
48 import { DebugElement } from '@angular/core';
50 describe('AppComponent', function () {
52 let comp: AppComponent;
53 let fixture: ComponentFixture<AppComponent>;
55 beforeEach(async(() => {
56 TestBed.configureTestingModule({
57 imports: [ BrowserModule,
58 BrowserAnimationsModule,
64 RouterModule.forRoot(dfroutes),
66 providers: [{provide: APP_BASE_HREF, useValue: '/'}],
67 declarations: [ AppComponent,
78 fixture = TestBed.createComponent(AppComponent);
79 comp = fixture.componentInstance;
80 //de = fixture.debugElement.query(By.css('h1'));
83 it('should create component', () => expect(comp).toBeDefined() );
85 /* it('should have expected <h1> text', () => {
86 fixture.detectChanges();
87 const h1 = de.nativeElement;
88 expect(h1.innerText).toMatch(/angular/i,
89 '<h1> should say something about "Angular"');