summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2023-04-13 08:28:45 +0100
committerMichael Morris <michael.morris@est.tech>2023-05-04 15:43:18 +0000
commitaf3fdfce91aeea1804c76a8571c102b78dde3794 (patch)
tree208b175c5a4b4d9522bdd7577a34722daab25137 /catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts
parentc4de5390c2a396e9ea88061454e40a92cea57ce1 (diff)
UI support for default custom function names
Issue-ID: SDC-4473 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: Ie4d002989857029300f0cc88123a5616a453aef0
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts
index 9c3c188711..c64547a9c7 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-custom-function/tosca-custom-function.component.spec.ts
@@ -29,12 +29,19 @@ import {TranslateModule} from "../../../../shared/translator/translate.module";
import {ToscaGetFunctionComponent} from "../tosca-get-function/tosca-get-function.component";
import {UiElementsModule} from "../../../../components/ui/ui-elements.module";
import {YamlFunctionComponent} from "../yaml-function/yaml-function.component";
+import {TopologyTemplateService} from "../../../../services/component-services/topology-template.service";
+import {Observable} from "rxjs/Observable";
+import {defaultCustomFunctionsMock} from "../../../../../../jest/mocks/default-custom-tosca-function.mock";
describe('ToscaCustomFunctionComponent', () => {
let component: ToscaCustomFunctionComponent;
let fixture: ComponentFixture<ToscaCustomFunctionComponent>;
+ let topologyTemplateServiceMock: Partial<TopologyTemplateService>;
beforeEach(async(() => {
+ topologyTemplateServiceMock = {
+ getDefaultCustomFunction: jest.fn().mockImplementation(() => Observable.of(defaultCustomFunctionsMock))
+ };
TestBed.configureTestingModule({
declarations: [
ToscaCustomFunctionComponent,
@@ -47,6 +54,9 @@ describe('ToscaCustomFunctionComponent', () => {
ReactiveFormsModule,
TranslateModule,
UiElementsModule
+ ],
+ providers: [
+ {provide: TopologyTemplateService, useValue: topologyTemplateServiceMock}
]
})
.compileComponents();