Skip to content

Commit

Permalink
Fix new unit test failure #1
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Apr 23, 2019
1 parent 5709790 commit 2bd840f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { KubernetesCertsAuthFormComponent } from './kubernetes-certs-auth-form.component';
import { FormBuilder } from '@angular/forms';
import { SharedModule } from '../../../../shared/shared.module';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';

import { SharedModule } from '../../../../shared/shared.module';
import { KubernetesCertsAuthFormComponent } from './kubernetes-certs-auth-form.component';

describe('KubernetesCertsAuthFormComponent', () => {
let component: KubernetesCertsAuthFormComponent;
let fixture: ComponentFixture<KubernetesCertsAuthFormComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ KubernetesCertsAuthFormComponent ],
declarations: [KubernetesCertsAuthFormComponent],
imports: [
SharedModule,
NoopAnimationsModule
]
})
.compileComponents();
.compileComponents();
}));

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

import { CfUserService } from '../../../shared/data-services/cf-user.service';
import { getActiveRouteCfOrgSpaceProvider } from '../cf.helpers';
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';
import { UserInviteService } from '../user-invites/user-invite.service';

function getCfIdFromUrl(activatedRoute: ActivatedRoute) {
return {
guid: activatedRoute.snapshot.params.endpointId
};
}
@Component({
selector: 'app-cloud-foundry-base',
templateUrl: './cloud-foundry-base.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
BaseTestModules,
generateTestCfEndpointServiceProvider,
} from '../../../../test-framework/cloud-foundry-endpoint-service.helper';
import { testSCFGuid } from '../../../../test-framework/store-test-helper';
import { ActiveRouteCfOrgSpace } from '../cf-page.types';
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';
import { CloudFoundryTabsBaseComponent } from './cloud-foundry-tabs-base.component';
Expand All @@ -20,7 +21,7 @@ describe('CloudFoundryTabsBaseComponent', () => {
providers: [
CloudFoundryEndpointService,
generateTestCfEndpointServiceProvider(),
ActiveRouteCfOrgSpace,
{ provide: ActiveRouteCfOrgSpace, useValue: { cfGuid: testSCFGuid } },
TabNavService
]
}).compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
StratosTabType,
} from '../../../core/extension/extension-service';
import { environment } from '../../../environments/environment.prod';
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';
import { IPageSideNavTab } from '../../dashboard/page-side-nav/page-side-nav.component';
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';

@Component({
selector: 'app-cloud-foundry-tabs-base',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ <h1>Cloud Foundry</h1>
</app-page-header>
<app-cf-endpoints-missing></app-cf-endpoints-missing>
<app-list *ngIf="(connectedEndpoints$ | async) > 1">
</app-list>
</app-list>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
BaseTestModules,
generateTestCfServiceProvider,
} from '../../../../test-framework/cloud-foundry-endpoint-service.helper';
import { CloudFoundryService } from '../../../shared/data-services/cloud-foundry.service';
import { PaginationMonitorFactory } from '../../../shared/monitors/pagination-monitor.factory';
import { CloudFoundryComponent } from './cloud-foundry.component';

Expand All @@ -19,7 +18,7 @@ describe('CloudFoundryComponent', () => {
TestBed.configureTestingModule({
declarations: [CloudFoundryComponent],
imports: [...BaseTestModules, BrowserAnimationsModule],
providers: [PaginationMonitorFactory, CloudFoundryService, generateTestCfServiceProvider(), TabNavService]
providers: [PaginationMonitorFactory, generateTestCfServiceProvider(), TabNavService]
}).compileComponents();
})
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import {
generateTestCfEndpointServiceProvider,
BaseTestModules,
generateTestCfEndpointServiceProvider,
} from '../../../../../test-framework/cloud-foundry-endpoint-service.helper';
import { EditOrganizationStepComponent } from './edit-organization-step.component';
import { ActiveRouteCfOrgSpace } from '../../cf-page.types';
import { EditOrganizationStepComponent } from './edit-organization-step.component';

describe('EditOrganizationStepComponent', () => {
let component: EditOrganizationStepComponent;
Expand Down

0 comments on commit 2bd840f

Please sign in to comment.