Skip to content

Commit

Permalink
SHIBUI-1395 fixed issue with @type for selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Aug 6, 2019
1 parent 0a1240c commit afc09c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/src/app/schema-form/widget/select/select.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="widget form-group">
<label [attr.for]="id" class="horizontal control-label">
<label [attr.for]="cleanId" class="horizontal control-label">
<span *ngIf="schema.title">
<translate-i18n [key]="schema.title">{{ schema.title }}</translate-i18n>
<i class="fa fa-asterisk text-danger" aria-hidden="true" *ngIf="required"></i>
Expand All @@ -15,7 +15,7 @@
{{ schema.description }}
</span>
<select *ngIf="schema.type !== 'array'"
[id]="formProperty._canonicalPath"
[id]="cleanId"
[formControl]="control"
[attr.name]="name"
class="form-control"
Expand All @@ -37,7 +37,7 @@
</ng-container>
</select>
<select *ngIf="schema.type === 'array'"
[id]="formProperty._canonicalPath"
[id]="cleanId"
multiple [formControl]="control"
[attr.name]="name"
[attr.disabled]="schema.readOnly"
Expand All @@ -50,5 +50,5 @@
<translate-i18n [key]="getError(error)">error</translate-i18n>
</ng-container>
</small>
<input *ngIf="schema.readOnly" [attr.name]="name" type="hidden" [formControl]="control">
<input *ngIf="schema.readOnly" [id]="cleanId" [attr.name]="name" type="hidden" [formControl]="control">
</div>
4 changes: 4 additions & 0 deletions ui/src/app/schema-form/widget/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,8 @@ export class CustomSelectComponent extends SelectWidget implements AfterViewInit
getError(error: string): string {
return HARD_CODED_REQUIRED_MSG.test(error) ? 'message.required' : error;
}

get cleanId(): string {
return this.formProperty._canonicalPath.replace('@', '');
}
}

0 comments on commit afc09c1

Please sign in to comment.