Skip to content

Commit 2bd840f

Browse files
committed
Fix new unit test failure #1
1 parent 5709790 commit 2bd840f

File tree

7 files changed

+12
-18
lines changed

7 files changed

+12
-18
lines changed

custom-src/frontend/app/custom/kubernetes/auth-forms/kubernetes-certs-auth-form/kubernetes-certs-auth-form.component.spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2-
3-
import { KubernetesCertsAuthFormComponent } from './kubernetes-certs-auth-form.component';
42
import { FormBuilder } from '@angular/forms';
5-
import { SharedModule } from '../../../../shared/shared.module';
63
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
74

5+
import { SharedModule } from '../../../../shared/shared.module';
6+
import { KubernetesCertsAuthFormComponent } from './kubernetes-certs-auth-form.component';
7+
88
describe('KubernetesCertsAuthFormComponent', () => {
99
let component: KubernetesCertsAuthFormComponent;
1010
let fixture: ComponentFixture<KubernetesCertsAuthFormComponent>;
1111

1212
beforeEach(async(() => {
1313
TestBed.configureTestingModule({
14-
declarations: [ KubernetesCertsAuthFormComponent ],
14+
declarations: [KubernetesCertsAuthFormComponent],
1515
imports: [
1616
SharedModule,
1717
NoopAnimationsModule
1818
]
1919
})
20-
.compileComponents();
20+
.compileComponents();
2121
}));
2222

2323
beforeEach(() => {

src/frontend/packages/core/src/features/cloud-foundry/cloud-foundry-base/cloud-foundry-base.component.ts

-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import { Component } from '@angular/core';
2-
import { ActivatedRoute } from '@angular/router';
32

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

9-
function getCfIdFromUrl(activatedRoute: ActivatedRoute) {
10-
return {
11-
guid: activatedRoute.snapshot.params.endpointId
12-
};
13-
}
148
@Component({
159
selector: 'app-cloud-foundry-base',
1610
templateUrl: './cloud-foundry-base.component.html',

src/frontend/packages/core/src/features/cloud-foundry/cloud-foundry-tabs-base/cloud-foundry-tabs-base.component.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
BaseTestModules,
66
generateTestCfEndpointServiceProvider,
77
} from '../../../../test-framework/cloud-foundry-endpoint-service.helper';
8+
import { testSCFGuid } from '../../../../test-framework/store-test-helper';
89
import { ActiveRouteCfOrgSpace } from '../cf-page.types';
910
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';
1011
import { CloudFoundryTabsBaseComponent } from './cloud-foundry-tabs-base.component';
@@ -20,7 +21,7 @@ describe('CloudFoundryTabsBaseComponent', () => {
2021
providers: [
2122
CloudFoundryEndpointService,
2223
generateTestCfEndpointServiceProvider(),
23-
ActiveRouteCfOrgSpace,
24+
{ provide: ActiveRouteCfOrgSpace, useValue: { cfGuid: testSCFGuid } },
2425
TabNavService
2526
]
2627
}).compileComponents();

src/frontend/packages/core/src/features/cloud-foundry/cloud-foundry-tabs-base/cloud-foundry-tabs-base.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import {
1414
StratosTabType,
1515
} from '../../../core/extension/extension-service';
1616
import { environment } from '../../../environments/environment.prod';
17-
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';
1817
import { IPageSideNavTab } from '../../dashboard/page-side-nav/page-side-nav.component';
18+
import { CloudFoundryEndpointService } from '../services/cloud-foundry-endpoint.service';
1919

2020
@Component({
2121
selector: 'app-cloud-foundry-tabs-base',

src/frontend/packages/core/src/features/cloud-foundry/cloud-foundry/cloud-foundry.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ <h1>Cloud Foundry</h1>
33
</app-page-header>
44
<app-cf-endpoints-missing></app-cf-endpoints-missing>
55
<app-list *ngIf="(connectedEndpoints$ | async) > 1">
6-
</app-list>
6+
</app-list>

src/frontend/packages/core/src/features/cloud-foundry/cloud-foundry/cloud-foundry.component.spec.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
BaseTestModules,
77
generateTestCfServiceProvider,
88
} from '../../../../test-framework/cloud-foundry-endpoint-service.helper';
9-
import { CloudFoundryService } from '../../../shared/data-services/cloud-foundry.service';
109
import { PaginationMonitorFactory } from '../../../shared/monitors/pagination-monitor.factory';
1110
import { CloudFoundryComponent } from './cloud-foundry.component';
1211

@@ -19,7 +18,7 @@ describe('CloudFoundryComponent', () => {
1918
TestBed.configureTestingModule({
2019
declarations: [CloudFoundryComponent],
2120
imports: [...BaseTestModules, BrowserAnimationsModule],
22-
providers: [PaginationMonitorFactory, CloudFoundryService, generateTestCfServiceProvider(), TabNavService]
21+
providers: [PaginationMonitorFactory, generateTestCfServiceProvider(), TabNavService]
2322
}).compileComponents();
2423
})
2524
);

src/frontend/packages/core/src/features/cloud-foundry/edit-organization/edit-organization-step/edit-organization-step.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import {
4-
generateTestCfEndpointServiceProvider,
54
BaseTestModules,
5+
generateTestCfEndpointServiceProvider,
66
} from '../../../../../test-framework/cloud-foundry-endpoint-service.helper';
7-
import { EditOrganizationStepComponent } from './edit-organization-step.component';
87
import { ActiveRouteCfOrgSpace } from '../../cf-page.types';
8+
import { EditOrganizationStepComponent } from './edit-organization-step.component';
99

1010
describe('EditOrganizationStepComponent', () => {
1111
let component: EditOrganizationStepComponent;

0 commit comments

Comments
 (0)