Fixes Issue #1938 - Fixed Positon should display enumerated value (#1939)

* Fixes #1938
Fixed usage of Telemetry API, use hints to get valueMetadata, use valueMetadata to get formatter

* dont circumvent chooseTelemetryKeyToDisplay, which was causing a regression when imagery is added to fp

* fix broken tests

* pass valueMetaData to limitEvaluator.evaluate, rename #chooseTelemetryKeyToDisplay to getValueMetadata, to reflect what is returned.
update tests

* change getValueMetadata to chooseValueMetadataToDisplay
This commit is contained in:
Deep Tailor
2018-03-07 13:49:11 -08:00
committed by Pete Richards
parent 5103207a70
commit 39a7f43cd0
2 changed files with 15 additions and 16 deletions

View File

@ -106,8 +106,8 @@ define(
'telemetryFormatter',
['format']
);
mockFormatter.format.andCallFake(function (value) {
return "Formatted " + value;
mockFormatter.format.andCallFake(function (valueMetadata) {
return "Formatted " + valueMetadata.value;
});
mockDomainObject = jasmine.createSpyObj(
@ -697,7 +697,7 @@ define(
source: 'range'
}
]);
var key = controller.chooseTelemetryKeyToDisplay(mockMetadata);
var key = controller.chooseValueMetadataToDisplay(mockMetadata).source;
expect(key).toEqual('range');
});
@ -719,7 +719,7 @@ define(
}
}
]);
var key = controller.chooseTelemetryKeyToDisplay(mockMetadata);
var key = controller.chooseValueMetadataToDisplay(mockMetadata).source;
expect(key).toEqual('image');
});