Revert "Merge remote-tracking branch 'origin/open793'"

This reverts commit f49552779a, reversing
changes made to e068173f3e.
This commit is contained in:
Pete Richards
2016-03-31 16:30:35 -07:00
parent f49552779a
commit d35fccbbe8
6 changed files with 100 additions and 187 deletions

View File

@ -89,24 +89,20 @@ define(
mockDomainObject= jasmine.createSpyObj('domainObject', [
'getCapability',
'hasCapability',
'useCapability',
'getModel'
]);
mockDomainObject.getModel.andReturn({});
mockDomainObject.hasCapability.andReturn(true);
mockDomainObject.getCapability.andReturn(
{
getMetadata: function (){
return {ranges: [{format: 'string'}]};
}
});
mockDomainObject.useCapability.andReturn(promise([]));
mockScope.domainObject = mockDomainObject;
mockTelemetryHandle = jasmine.createSpyObj('telemetryHandle', [
'request',
'getMetadata',
'unsubscribe',
'getDatum',
@ -117,7 +113,6 @@ define(
// used by mocks
mockTelemetryHandle.getTelemetryObjects.andReturn([{}]);
mockTelemetryHandle.promiseTelemetryObjects.andReturn(promise(undefined));
mockTelemetryHandle.request.andReturn(promise(undefined));
mockTelemetryHandle.getDatum.andReturn({});
mockTelemetryHandler = jasmine.createSpyObj('telemetryHandler', [
@ -128,8 +123,6 @@ define(
controller = new TableController(mockScope, mockTelemetryHandler, mockTelemetryFormatter);
controller.table = mockTable;
controller.handle = mockTelemetryHandle;
spyOn(controller, 'updateRealtime');
controller.updateRealtime.andCallThrough();
});
it('registers for streaming telemetry', function () {
@ -137,16 +130,14 @@ define(
expect(mockTelemetryHandler.handle).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Function), true);
});
describe('when receiving new telemetry', function () {
describe('receives new telemetry', function () {
beforeEach(function() {
controller.subscribe();
mockScope.rows = [];
mockTable.columns = ['a', 'b'];
});
it('updates table with new streaming telemetry', function () {
mockTelemetryHandler.handle.mostRecentCall.args[1]();
expect(controller.updateRealtime).toHaveBeenCalled();
expect(mockScope.$broadcast).toHaveBeenCalledWith('add:row', 0);
});
it('observes the row limit', function () {