| /* tslint:disable:no-unused-variable */ |
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
| import { By } from '@angular/platform-browser'; |
| import { DebugElement } from '@angular/core'; |
| import { AbstractMockObservableService } from '../../common/abstract-mock-observable.service'; |
| import { ShiftChangeProtocolComponent } from './shift-change-protocol.component'; |
| import { Responsibility } from '../../model/responsibility'; |
| import { RESPONSIBILITIES } from '../../test-data/responsibilities'; |
| import { click } from '../../testing'; |
| import { MockComponent } from '../../testing/mock.component'; |
| import { ResponsibilityService } from '../../services/responsibility.service'; |
| |
| describe('ShiftChangeProtocolComponent', () => { |
| let component: ShiftChangeProtocolComponent; |
| let fixture: ComponentFixture<ShiftChangeProtocolComponent>; |
| let mockService; |
| |
| class MockBtbService extends AbstractMockObservableService { |
| getPlanedResponsibilities() { |
| return this; |
| }; |
| confirmResponsibilities(resp: Responsibility[]) { |
| return this; |
| }; |
| } |
| |
| beforeEach(async(() => { |
| mockService = new MockBtbService(); |
| TestBed.configureTestingModule({ |
| declarations: [ShiftChangeProtocolComponent, |
| MockComponent({ |
| selector: 'app-responsibility', |
| inputs: [ |
| 'responsiblitySelection', |
| 'withCheckboxes', |
| 'withEditButtons', |
| 'isCollapsible'] |
| }), |
| MockComponent({ |
| selector: 'app-future-notifications', |
| inputs: [ |
| 'responsiblitySelection', |
| 'withCheckboxes', |
| 'withEditButtons', |
| 'isCollapsible', |
| 'stayHidden'] |
| }), |
| MockComponent({ |
| selector: 'app-open-notifications', |
| inputs: [ |
| 'responsiblitySelection', |
| 'withCheckboxes', |
| 'withEditButtons', |
| 'isCollapsible', |
| 'stayHidden'] |
| }), |
| MockComponent({ |
| selector: 'app-finished-notifications ', |
| inputs: [ |
| 'responsiblitySelection', |
| 'withCheckboxes', |
| 'withEditButtons', |
| 'isCollapsible', |
| 'stayHidden'] |
| })], |
| providers: [ |
| { provide: ResponsibilityService, useValue: mockService } |
| ] |
| }) |
| .compileComponents(); |
| })); |
| |
| beforeEach(() => { |
| fixture = TestBed.createComponent(ShiftChangeProtocolComponent); |
| component = fixture.componentInstance; |
| fixture.detectChanges(); |
| }); |
| }); |