From ef176093dd53f923093c4e5dd7dded706aa27fc1 Mon Sep 17 00:00:00 2001 From: Pablo Martinez Garcia Date: Wed, 26 Jan 2022 16:35:17 +0100 Subject: [PATCH] [AAE-7095] Automate data models (#3369) * [ci:force][AAE-7095] Automate data models * [ci:force][AAE-7095] PR comments * [ci:force][AAE-7095] Fix tests * [AAE-7094] PR comments * [AAE-7094] Minor fixes * [AAE-7095] Fix lint --- .../json-schema-editor.component.html | 55 +++++++++++-------- .../property-type-dialog.component.html | 2 +- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/projects/modeling-shared/sdk/src/lib/variables/json-schema/components/json-schema-editor/json-schema-editor.component.html b/projects/modeling-shared/sdk/src/lib/variables/json-schema/components/json-schema-editor/json-schema-editor.component.html index 2042f9926..02b756762 100644 --- a/projects/modeling-shared/sdk/src/lib/variables/json-schema/components/json-schema-editor/json-schema-editor.component.html +++ b/projects/modeling-shared/sdk/src/lib/variables/json-schema/components/json-schema-editor/json-schema-editor.component.html @@ -16,7 +16,8 @@ [ngClass]="(type | isAnyType: 'object': 'array': 'allOf': 'anyOf': 'oneOf') ? 'modelingsdk-json-schema-editor-parent' : ''"> + [modelingsdk-allowed-characters]="regex" (blur)="onChangeName($event)" + [attr.data-automation-id]="'json-schema-editor-name'"/> {{ 'SDK.VARIABLES_EDITOR.ERRORS.EMPTY_NAME' | translate }} @@ -30,14 +31,15 @@
+ (change)="onCheck($event)" [attr.data-automation-id]="'json-schema-editor-required'">
- + @@ -49,72 +51,73 @@ + [hierarchy]="hierarchy | async" [(ngModel)]="value.$ref" (change)="onReferenceChanges($event)" + [attr.data-automation-id]="'json-schema-editor-reference'">
-
- - - - - - - - - - - @@ -128,7 +131,8 @@ (nameChanges)="onNameChanges($event)" (propertyDeleted)="onPropertyDeleted($event)" [required]="value | requiredPipe : properties[i].key" [lastChild]="lastTypeNotEmpty === 'object' && i === properties.length -1" - [hierarchy]="hierarchy"> + [hierarchy]="hierarchy" + [attr.data-automation-id]="'property_' + (depth+1) + '_' + i">
@@ -137,7 +141,8 @@ + [lastChild]="lastTypeNotEmpty === 'array'" [hierarchy]="hierarchy" + [attr.data-automation-id]="'array' + (depth+1)"> @@ -147,7 +152,8 @@ (requiredChanges)="onRequiredChanges($event)" (nameChanges)="onNameChanges($event)" (childrenDeleted)="onChildrenDeleted($event)" [blockedNode]="true" [compositionIndex]="i" [lastChild]="lastTypeNotEmpty === 'allOf' && i === value.allOf.length -1" - (changes)="onChanges()" [hierarchy]="hierarchy"> + (changes)="onChanges()" [hierarchy]="hierarchy" + [attr.data-automation-id]="'allOf_' + (depth+1) + '_' + i"> @@ -157,7 +163,8 @@ (requiredChanges)="onRequiredChanges($event)" (nameChanges)="onNameChanges($event)" (childrenDeleted)="onChildrenDeleted($event)" [blockedNode]="true" [compositionIndex]="i" [lastChild]="lastTypeNotEmpty === 'anyOf' && i === value.anyOf.length -1" - (changes)="onChanges()" [hierarchy]="hierarchy"> + (changes)="onChanges()" [hierarchy]="hierarchy" + [attr.data-automation-id]="'anyOf_' + (depth+1) + '_' + i"> @@ -167,7 +174,8 @@ (requiredChanges)="onRequiredChanges($event)" (nameChanges)="onNameChanges($event)" (childrenDeleted)="onChildrenDeleted($event)" [blockedNode]="true" [compositionIndex]="i" [lastChild]="lastTypeNotEmpty === 'oneOf' && i === value.oneOf.length -1" - (changes)="onChanges()" [hierarchy]="hierarchy"> + (changes)="onChanges()" [hierarchy]="hierarchy" + [attr.data-automation-id]="'oneOf_' + (depth+1) + '_' + i"> @@ -202,7 +210,8 @@ + [lastChild]="i === definitions.length -1" [displayRequired]="false" [hierarchy]="hierarchy" + [attr.data-automation-id]="'definition_' + (depth+1) + '_' + i"> diff --git a/projects/modeling-shared/sdk/src/lib/variables/properties-viewer/property-type-dialog/property-type-dialog.component.html b/projects/modeling-shared/sdk/src/lib/variables/properties-viewer/property-type-dialog/property-type-dialog.component.html index 4124e7aef..1db56d4f1 100644 --- a/projects/modeling-shared/sdk/src/lib/variables/properties-viewer/property-type-dialog/property-type-dialog.component.html +++ b/projects/modeling-shared/sdk/src/lib/variables/properties-viewer/property-type-dialog/property-type-dialog.component.html @@ -1,7 +1,7 @@

{{'SDK.PROPERTY_TYPE_SELECTOR.EDIT_MODEL' | translate}}

- +