aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArielk <Ariel.Kenan@amdocs.com>2019-01-21 13:11:42 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2019-01-22 09:31:23 +0000
commita868a311efee8710f29f89c9406903f9f9b7f392 (patch)
tree3828a93d18778b7d1fd7d982a2c8ffee77d12a8d
parent7d8c592bdd302fe59fe12b134af941c2dd6ab058 (diff)
Null x when adding operation to empty list
Change-Id: Ib54f29049d8b576f48f8459439650c45fe1248f6 Issue-ID: SDC-2052 Signed-off-by: Arielk <Ariel.Kenan@amdocs.com>
-rw-r--r--catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts9
-rw-r--r--catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html38
2 files changed, 24 insertions, 23 deletions
diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts
index 7f31e99b93..e746c6d6fe 100644
--- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts
+++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/operation-creator.component.ts
@@ -224,11 +224,12 @@ export class OperationCreatorComponent {
_.map(
this.interfaceTypes[this.operation.interfaceType],
name => {
+ const curInterf = _.find(
+ this.interfaces,
+ interf => interf.type === this.operation.interfaceType
+ );
const existingOp = _.find(
- _.find(
- this.interfaces,
- interf => interf.type === this.operation.interfaceType
- ).operations,
+ curInterf && curInterf.operations || [],
op => op.name === name
);
const ddType = (existingOp && existingOp.uniqueId !== this.operation.uniqueId) ? 2 : 0;
diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html
index 18142c982b..d23783715c 100644
--- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html
+++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html
@@ -1,5 +1,5 @@
<!--
- ~ Copyright � 2016-2018 European Support Limited
+ ~ Copyright © 2016-2018 European Support Limited
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
@@ -13,11 +13,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
+
<div class="cell field-name">
<ui-element-input
*ngIf="!isAssociateWorkflow"
- data-tests-id="paramName"
+ [testId]="'param-name-' + (param.name || 'unnamed')"
[(value)]="param.name"
(valueChange)="onChangeName()"
[readonly]="readonly">
@@ -28,7 +28,7 @@
<div class="cell field-type">
<ui-element-dropdown
*ngIf="!isAssociateWorkflow"
- data-tests-id="paramType"
+ [testId]="'param-type-' + (param.name || 'unnamed')"
[values]="propTypeEnum"
[(value)]="param.type"
(valueChange)="onChangeType()"
@@ -38,14 +38,14 @@
</div>
<div class="cell field-property" *ngIf="isInputParam">
- <ui-element-dropdown
- *ngIf="filteredInputProps.length || !isAssociateWorkflow"
- data-tests-id="paramProperty"
- [values]="filteredInputProps"
- [(value)]="param.inputId"
- (valueChange)="onChangeProperty($event)"
- [readonly]="readonly">
- </ui-element-dropdown>
+ <ui-element-dropdown
+ *ngIf="filteredInputProps.length || !isAssociateWorkflow"
+ [testId]="'param-property-' + (param.name || 'unnamed')"
+ [values]="filteredInputProps"
+ [(value)]="param.inputId"
+ (valueChange)="onChangeProperty($event)"
+ [readonly]="readonly">
+ </ui-element-dropdown>
<span
*ngIf="!filteredInputProps.length && isAssociateWorkflow"
class="no-properties-error">
@@ -56,7 +56,7 @@
<div class="cell field-mandatory" *ngIf="!isAssociateWorkflow">
<checkbox
*ngIf="!isAssociateWorkflow"
- data-tests-id="paramMandatory"
+ [attr.data-tests-id]="'param-mandatory-' + (param.name || 'unnamed')"
[(checked)]="param.required"
[ngClass]="{'disabled':readonly}">
</checkbox>
@@ -64,11 +64,11 @@
<div class="cell remove" *ngIf="!isAssociateWorkflow && !readonly">
<svg-icon
- name="trash-o"
- mode="info"
- size="small"
- testId="removeInputParam"
- (click)="onRemoveParam(param)"
- [clickable]="true">
+ name="trash-o"
+ mode="info"
+ size="small"
+ [attr.data-tests-id]="'param-remove-' + (param.name || 'unnamed')"
+ (click)="onRemoveParam(param)"
+ [clickable]="true">
</svg-icon>
</div>