mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3298] Select CardView item label removed (#3555)
* placeholder removed * test added
This commit is contained in:
committed by
Eugenio Romano
parent
ef866fdbdb
commit
1bba43af8c
@@ -3,7 +3,7 @@
|
||||
<div *ngIf="!isEditable()" data-automation-class="read-only-value">{{ property.displayValue | async }}</div>
|
||||
<div *ngIf="isEditable()">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="{{ property.label | translate }}" [(value)]="value" (change)="onChange($event)" data-automation-class="select-box">
|
||||
<mat-select [(value)]="value" (change)="onChange($event)" data-automation-class="select-box">
|
||||
<mat-option *ngFor="let option of getOptions() | async" [value]="option.key">
|
||||
{{ option.label | translate }}
|
||||
</mat-option>
|
||||
|
@@ -87,6 +87,15 @@ describe('CardViewSelectItemComponent', () => {
|
||||
expect(selectBox).not.toBeNull();
|
||||
});
|
||||
|
||||
it('should not have label twice', () => {
|
||||
component.ngOnChanges();
|
||||
component.editable = true;
|
||||
fixture.detectChanges();
|
||||
|
||||
const label = fixture.debugElement.query(By.css('[data-automation-class="select-box"] .mat-form-field-label'));
|
||||
expect(label).toBeNull();
|
||||
});
|
||||
|
||||
it('should update property on input blur', async(() => {
|
||||
spyOn(cardViewUpdateService, 'update');
|
||||
|
||||
|
Reference in New Issue
Block a user