Skip to content

Try to fix, ng test with karma #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ describe('AppComponent', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
expect(compiled.querySelector('h1').textContent).toContain('app works!');
}));
});
6 changes: 5 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

import { HttpModule } from '@angular/http';

import { FileUploadMasterPageComponent } from './file-upload-master-page/file-upload-master-page.component';
import { ChartModule } from 'angular2-highcharts';
import { HighchartsStatic } from 'angular2-highcharts/dist/HighchartsService';
Expand Down Expand Up @@ -61,6 +64,7 @@ export function highchartsFactory() {
],
imports: [
BrowserModule,
HttpModule,
AppRoutingModule,
SDKBrowserModule.forRoot(),
FormsModule,
Expand All @@ -71,7 +75,7 @@ export function highchartsFactory() {
Ng2GoogleChartsModule,
ChartModule
],
providers: [AuthGuard, AuthService, ChatService, {
providers: [AuthGuard, AuthService, ChatService, HttpModule, {
provide: HighchartsStatic,
useFactory: highchartsFactory
}],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { FormsModule } from '@angular/forms';
import { FileUploadAdvancedPageComponent } from './file-upload-advance-page.component';

describe('HomePageComponent', () => {
Expand All @@ -8,6 +8,7 @@ describe('HomePageComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ FormsModule ],
declarations: [ FileUploadAdvancedPageComponent ]
})
.compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { NgModel, FormsModule } from '@angular/forms';
@Component({
selector: 'app-home-page',
templateUrl: './file-upload-advance-page.component.html',
styleUrls: ['./file-upload-advance-page.component.scss']
styleUrls: ['./file-upload-advance-page.component.scss'],
providers: [StorageSimpleUploadApi],
})

export class FileUploadAdvancedPageComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { NgModel, FormsModule } from '@angular/forms';
@Component({
selector: 'app-home-page',
templateUrl: './file-upload-master-page.component.html',
styleUrls: ['./file-upload-master-page.component.scss']
styleUrls: ['./file-upload-master-page.component.scss'],
providers: [StorageSimpleUploadApi],
})

export class FileUploadMasterPageComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { FormsModule } from '@angular/forms';
import { FileUploadPageComponent } from './file-upload-page.component';

describe('HomePageComponent', () => {
Expand All @@ -8,6 +8,7 @@ describe('HomePageComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ FormsModule ],
declarations: [ FileUploadPageComponent ]
})
.compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { NgModel, FormsModule } from '@angular/forms';
@Component({
selector: 'app-home-page',
templateUrl: './file-upload-page.component.html',
styleUrls: ['./file-upload-page.component.scss']
styleUrls: ['./file-upload-page.component.scss'],
providers: [StorageSimpleUploadApi],
})

export class FileUploadPageComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { Http, HttpModule } from '@angular/http';
import { ChatRoomPageComponent } from './chat-room-page.component';

describe('ChatRoomPageComponent', () => {
Expand All @@ -8,6 +8,7 @@ describe('ChatRoomPageComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
providers: [Http, HttpModule],
declarations: [ ChatRoomPageComponent ]
})
.compileComponents();
Expand Down
5 changes: 3 additions & 2 deletions src/app/home-page/chat-room-page/chat-room-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
import { ChatService } from '../../chat.service';
import { RoomchatApi } from '../../../shared/services/custom/Roomchat';
import { Http, Response } from '@angular/http';
import { Http, HttpModule, Response } from '@angular/http';
import { ChatdetailApi } from '../../../shared/services/custom/Chatdetail';
import { RealTime } from '../../../shared/services/core/real.time';
import { FireLoopRef } from '../../../shared/models/FireLoopRef';
Expand All @@ -13,7 +13,8 @@ import 'rxjs/add/operator/switchMap';
@Component({
selector: 'app-chat-room-page',
templateUrl: './chat-room-page.component.html',
styleUrls: ['./chat-room-page.component.scss']
styleUrls: ['./chat-room-page.component.scss'],
providers: [Http, HttpModule],
})
export class ChatRoomPageComponent implements OnInit {

Expand Down
6 changes: 4 additions & 2 deletions src/app/home-page/crud-page/crud-page.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { ProfiledataApi } from './../../../shared/services/custom/Profiledata';
import { StorageSimpleUploadApi } from './../../../shared/services/custom/StorageSimpleUpload';

import { LoopBackConfig } from './../../../shared/lb.config';
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, Injectable } from '@angular/core';
import { UUID } from 'angular2-uuid';

@Component({
selector: 'app-crud-page',
templateUrl: './crud-page.component.html',
styleUrls: ['./crud-page.component.scss']
styleUrls: ['./crud-page.component.scss'],
providers: [StorageSimpleUploadApi],
})
export class CrudPageComponent implements OnInit {

Expand Down
3 changes: 3 additions & 0 deletions src/app/home-page/home-page.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Router } from '@angular/router';
import { HttpModule, Http } from '@angular/http';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { HomePageComponent } from './home-page.component';
Expand All @@ -8,6 +10,7 @@ describe('HomePageComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
providers: [Http, HttpModule, Router],
declarations: [ HomePageComponent ]
})
.compileComponents();
Expand Down
6 changes: 4 additions & 2 deletions src/app/home-page/home-page.component.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { HttpModule, Http } from '@angular/http';
import { Router } from '@angular/router';
import { AuthService } from './../auth.service';
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-home-page',
templateUrl: './home-page.component.html',
styleUrls: ['./home-page.component.scss']
styleUrls: ['./home-page.component.scss'],
})
export class HomePageComponent implements OnInit {


showMiniMenu: Boolean = false;

displayChart: String = 'none';

constructor(
public authService: AuthService,
private router: Router,
Expand Down
3 changes: 2 additions & 1 deletion src/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ import { ProfiledataApi } from './services/custom/Profiledata';
exports: [ ],
providers: [
ErrorHandler,
SocketConnection
SocketConnection,
HttpModule
]
})
export class SDKBrowserModule {
Expand Down