AAE-23115 Display key of the user attribute in external property preview (#9835)

This commit is contained in:
Tomasz Gnyp
2024-06-19 12:47:39 +02:00
committed by GitHub
parent a8b79eb0de
commit eeb886aed4
2 changed files with 3 additions and 2 deletions

View File

@@ -27,7 +27,7 @@
<span class="adf-display-external-property-widget-preview"
data-automation-id="adf-display-external-property-widget-preview"
>
{{ field.externalProperty }}
{{ field.params.externalPropertyLabel }}
</span>
</ng-container>
</mat-form-field>

View File

@@ -97,6 +97,7 @@ describe('DisplayExternalPropertyWidgetComponent', () => {
widget.field = new FormFieldModel(new FormModel({ taskId: '<id>' }), {
type: FormFieldTypes.DISPLAY_EXTERNAL_PROPERTY,
externalProperty: 'fruitName',
params: { externalPropertyLabel: 'Fruit Name' },
value: null
});
@@ -111,7 +112,7 @@ describe('DisplayExternalPropertyWidgetComponent', () => {
it('should display external property name', () => {
const externalPropertyPreview = fixture.debugElement.query(By.css('[data-automation-id="adf-display-external-property-widget-preview"]'));
expect(externalPropertyPreview.nativeElement.textContent.trim()).toBe('fruitName');
expect(externalPropertyPreview.nativeElement.textContent.trim()).toBe('Fruit Name');
});
});