Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
| 17 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
| 18 | import { DebugElement } from '@angular/core'; |
| 19 | import { By } from '@angular/platform-browser'; |
| 20 | |
Sean Condon | 5ca0026 | 2018-09-06 17:55:25 +0100 | [diff] [blame] | 21 | import { ConsoleLoggerService } from '../../consolelogger.service'; |
| 22 | import { LogService } from '../../log.service'; |
Sean Condon | 2aa8609 | 2018-07-16 09:04:05 +0100 | [diff] [blame] | 23 | import { FlashComponent } from './flash.component'; |
| 24 | |
| 25 | /** |
| 26 | * ONOS GUI -- Layer -- Flash Component - Unit Tests |
| 27 | */ |
| 28 | describe('FlashComponent', () => { |
| 29 | let log: LogService; |
| 30 | let component: FlashComponent; |
| 31 | let fixture: ComponentFixture<FlashComponent>; |
| 32 | |
| 33 | beforeEach(async(() => { |
| 34 | log = new ConsoleLoggerService(); |
| 35 | TestBed.configureTestingModule({ |
| 36 | imports: [ BrowserAnimationsModule ], |
| 37 | declarations: [ FlashComponent ], |
| 38 | providers: [ |
| 39 | { provide: LogService, useValue: log }, |
| 40 | ] |
| 41 | }); |
| 42 | })); |
| 43 | |
| 44 | beforeEach(() => { |
| 45 | fixture = TestBed.createComponent(FlashComponent); |
| 46 | component = fixture.debugElement.componentInstance; |
| 47 | fixture.detectChanges(); |
| 48 | }); |
| 49 | |
| 50 | it('should create', () => { |
| 51 | expect(component).toBeTruthy(); |
| 52 | }); |
| 53 | |
| 54 | // it('should have a div#flash', () => { |
| 55 | // component.enabled = true; |
| 56 | // const appDe: DebugElement = fixture.debugElement; |
| 57 | // const divDe = appDe.query(By.css('div#flash')); |
| 58 | // expect(divDe).toBeTruthy(); |
| 59 | // }); |
| 60 | }); |