[3463] add missing informations to report diagram (#3690)

This commit is contained in:
Mario Romano
2018-08-11 01:27:54 +01:00
committed by Eugenio Romano
parent ff732dcdca
commit 6e1d7336ac
2 changed files with 24 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
<div #tooltipContent class="{{adf}}-diagram-tooltip">
<div class="{{adf}}-diagram-tooltip-header">{{ data.type }} {{ data.name || data.id }}</div>
<div class="{{adf}}-diagram-tooltip-body">
<div *ngIf="data.value" class="{{adf}}-diagram-heat-value">
<span class="{{adf}}-diagram-value">{{ data.value }}</span>
<span class="{{adf}}-diagram-valuetype"> {{ data.dataType }}</span>
</div>
<div *ngIf="data.name" class="{{adf}}-diagram-name-property">
<span class="{{adf}}-diagram-propertyName">Name:</span>
<span class="{{adf}}-diagram-propertyValue">{{ data.name }}</span>

View File

@@ -106,6 +106,21 @@ describe('DiagramTooltipComponent', () => {
expect(propertyValues[0].nativeElement.innerText).toBe('property-1-value');
expect(propertyValues[1].nativeElement.innerText).toBe('property-2-value');
});
it('should render value and data type', () => {
data.value = '1';
data.dataType = 'hour';
fixture.detectChanges();
let propertyValue = fixture.debugElement.queryAll(By.css('.adf-diagram-heat-value > .adf-diagram-value')),
propertyValueType = fixture.debugElement.queryAll(By.css('.adf-diagram-heat-value > .adf-diagram-valuetype'));
expect(propertyValue.length).toBe(1);
expect(propertyValueType.length).toBe(1);
expect(propertyValue[0].nativeElement.innerText).toBe('1');
expect(propertyValueType[0].nativeElement.innerText).toBe(' hour');
});
});
describe('Tooltip functionality', () => {