beforeEach(() => { fixture = TestBed.createComponent(MatSelectSearchTestComponent); component = fixture.componentInstance; fixture.detectChanges(); });
describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [RouterTestingModule, MaterializeModule], declarations: [ AppComponent, HeaderSection, FooterSection ], }).compileComponents(); })); it('should create the app', async(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; expect(app).toBeTruthy(); })); });
describe('AppComponent with TCB', function () { beforeEach(() => { TestBed.configureTestingModule({declarations: [AppComponent]}); }); it('should instantiate component', () => { let fixture = TestBed.createComponent(AppComponent); expect(fixture.componentInstance instanceof AppComponent).toBe(true, 'should create AppComponent'); }); it('should have expected <h1> text', () => { let fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); let h1 = fixture.debugElement.query(el => el.name === 'h1').nativeElement; // it works h1 = fixture.debugElement.query(By.css('h1')).nativeElement; // preferred expect(h1.innerText).toMatch(/angular app/i, '<h1> should say something about "Angular App"'); }); });
describe('DeviceMapComponent', () => { let component: DeviceMapComponent; let fixture: ComponentFixture<DeviceMapComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ DeviceMapComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(DeviceMapComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('TagPropertyComponent', () => { let component: TagPropertyComponent; let fixture: ComponentFixture<TagPropertyComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ TagPropertyComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(TagPropertyComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('GaugeProgressComponent', () => { let component: GaugeProgressComponent; let fixture: ComponentFixture<GaugeProgressComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ GaugeProgressComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(GaugeProgressComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('HtmlSelectComponent', () => { let component: HtmlSelectComponent; let fixture: ComponentFixture<HtmlSelectComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ HtmlSelectComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(HtmlSelectComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('FlexHeadComponent', () => { let component: FlexHeadComponent; let fixture: ComponentFixture<FlexHeadComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ FlexHeadComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(FlexHeadComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('FlexInputComponent', () => { let component: FlexInputComponent; let fixture: ComponentFixture<FlexInputComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ FlexInputComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(FlexInputComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('ShapesComponent', () => { let component: ShapesComponent; let fixture: ComponentFixture<ShapesComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ ShapesComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(ShapesComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('SwitchComponent', () => { let component: SwitchComponent; let fixture: ComponentFixture<SwitchComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ SwitchComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(SwitchComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('SelOptionsComponent', () => { let component: SelOptionsComponent; let fixture: ComponentFixture<SelOptionsComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ SelOptionsComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(SelOptionsComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('TextListComponent', () => { let component: TextListComponent; let fixture: ComponentFixture<TextListComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ TextListComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(TextListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('AlarmViewComponent', () => { let component: AlarmViewComponent; let fixture: ComponentFixture<AlarmViewComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AlarmViewComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(AlarmViewComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });
describe('UsersComponent', () => { let component: UsersComponent; let fixture: ComponentFixture<UsersComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ UsersComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(UsersComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); });