Skip to content
Merged
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
14 changes: 6 additions & 8 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { RouterTestingModule } from '@angular/router/testing'
import { AppComponent } from './app.component'

describe('AppComponent', () => {
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent]
}).compileComponents()
})
)
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent]
}).compileComponents()
}))

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent)
Expand Down
12 changes: 5 additions & 7 deletions src/app/components/login-modal/login-modal.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ describe('LoginModalComponent', () => {
let component: LoginModalComponent
let fixture: ComponentFixture<LoginModalComponent>

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [LoginModalComponent]
}).compileComponents()
})
)
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [LoginModalComponent]
}).compileComponents()
}))

beforeEach(() => {
fixture = TestBed.createComponent(LoginModalComponent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ describe('RequestsModalComponent', () => {
let component: RequestsModalComponent
let fixture: ComponentFixture<RequestsModalComponent>

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [RequestsModalComponent]
}).compileComponents()
})
)
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [RequestsModalComponent]
}).compileComponents()
}))

beforeEach(() => {
fixture = TestBed.createComponent(RequestsModalComponent)
Expand Down
2 changes: 1 addition & 1 deletion src/app/data/data.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>

<span *ngIf="springsLoading" class="spinner spinner-md"> Loading... </span>
<p *ngIf="noData"> No Data in Response </p>
<p *ngIf="noData">No Data in Response</p>

<table *ngIf="springs?.length > 0 && !springsLoading" class="table">
<thead>
Expand Down
12 changes: 5 additions & 7 deletions src/app/data/data.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ describe('DataComponent', () => {
let component: DataComponent
let fixture: ComponentFixture<DataComponent>

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DataComponent]
}).compileComponents()
})
)
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DataComponent]
}).compileComponents()
}))

beforeEach(() => {
fixture = TestBed.createComponent(DataComponent)
Expand Down
4 changes: 3 additions & 1 deletion src/app/data/data.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export class DataComponent implements OnInit {

ngOnInit(): void {
this.stateService.startupData.subscribe((data: any) => {
this.areas = data
this.areas = data.areas
// Example to access another table from same response:
// data.secondTable
})
}

Expand Down
12 changes: 5 additions & 7 deletions src/app/home-page/home-page.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ describe('HomePageComponent', () => {
let component: HomePageComponent
let fixture: ComponentFixture<HomePageComponent>

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HomePageComponent]
}).compileComponents()
})
)
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HomePageComponent]
}).compileComponents()
}))

beforeEach(() => {
fixture = TestBed.createComponent(HomePageComponent)
Expand Down
2 changes: 1 addition & 1 deletion src/app/sas.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class SasService {
public fetchStartupData() {
this.request('common/appinit', null).then((response: any) => {
console.log(response)
this.stateService.setStartupData(response.areas)
this.stateService.setStartupData(response)
})
}

Expand Down