mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[3463] add missing informations to report diagram (#3690)
This commit is contained in:
committed by
Eugenio Romano
parent
ff732dcdca
commit
6e1d7336ac
@@ -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>
|
||||
|
@@ -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', () => {
|
||||
|
Reference in New Issue
Block a user