mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
#1052 - fix tests to reflect tooltip changes
This commit is contained in:
@@ -37,6 +37,10 @@ describe('Test ng2-activiti-analytics-report-heat-map', () => {
|
|||||||
let totalTimePerc = { 'sid-fake-id': 10, 'fake-start-event': 30 };
|
let totalTimePerc = { 'sid-fake-id': 10, 'fake-start-event': 30 };
|
||||||
let avgTimePercentages = { 'sid-fake-id': 5, 'fake-start-event': 50 };
|
let avgTimePercentages = { 'sid-fake-id': 5, 'fake-start-event': 50 };
|
||||||
|
|
||||||
|
let totalCountValues = { 'sid-fake-id': 2, 'fake-start-event': 3 };
|
||||||
|
let totalTimeValues = { 'sid-fake-id': 1, 'fake-start-event': 4 };
|
||||||
|
let avgTimeValues = { 'sid-fake-id': 4, 'fake-start-event': 5 };
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -65,7 +69,10 @@ describe('Test ng2-activiti-analytics-report-heat-map', () => {
|
|||||||
|
|
||||||
component.report = {
|
component.report = {
|
||||||
totalCountsPercentages: totalCountPerc,
|
totalCountsPercentages: totalCountPerc,
|
||||||
|
totalCountValues: totalCountValues,
|
||||||
totalTimePercentages: totalTimePerc,
|
totalTimePercentages: totalTimePerc,
|
||||||
|
totalTimeValues: totalTimeValues,
|
||||||
|
avgTimeValues: avgTimeValues,
|
||||||
avgTimePercentages: avgTimePercentages
|
avgTimePercentages: avgTimePercentages
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -108,19 +115,22 @@ describe('Test ng2-activiti-analytics-report-heat-map', () => {
|
|||||||
it('should change the currentmetric width totalCount', async(() => {
|
it('should change the currentmetric width totalCount', async(() => {
|
||||||
let field = { value: 'totalCount' };
|
let field = { value: 'totalCount' };
|
||||||
component.onMetricChanges(field);
|
component.onMetricChanges(field);
|
||||||
expect(component.currentMetric).toEqual(totalCountPerc);
|
expect(component.currentMetric).toEqual(totalCountValues);
|
||||||
|
expect(component.currentMetricColors).toEqual(totalCountPerc);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should change the currentmetric width totalTime', async(() => {
|
it('should change the currentmetric width totalTime', async(() => {
|
||||||
let field = { value: 'totalTime' };
|
let field = { value: 'totalTime' };
|
||||||
component.onMetricChanges(field);
|
component.onMetricChanges(field);
|
||||||
expect(component.currentMetric).toEqual(totalTimePerc);
|
expect(component.currentMetric).toEqual(totalTimeValues);
|
||||||
|
expect(component.currentMetricColors).toEqual(totalTimePerc);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should change the currentmetric width avgTime', async(() => {
|
it('should change the currentmetric width avgTime', async(() => {
|
||||||
let field = { value: 'avgTime' };
|
let field = { value: 'avgTime' };
|
||||||
component.onMetricChanges(field);
|
component.onMetricChanges(field);
|
||||||
expect(component.currentMetric).toEqual(avgTimePercentages);
|
expect(component.currentMetric).toEqual(avgTimeValues);
|
||||||
|
expect(component.currentMetricColors).toEqual(avgTimePercentages);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user