[Tables] Modified selection of scrollable element. Fixes #1216

This commit is contained in:
Henry
2016-10-04 18:23:13 -07:00
parent c9c8998fa2
commit bff4e120a7
2 changed files with 17 additions and 22 deletions

View File

@ -22,9 +22,16 @@
define(
[
"zepto",
"../../src/controllers/MCTTableController"
],
function (MCTTableController) {
function ($, MCTTableController) {
var MOCK_ELEMENT_TEMPLATE =
'<div><div class="l-view-section scrolling">' +
'<table class="sizing-table"><tbody></tbody></table>' +
'<table class="mct-table"><thead></thead></table>' +
'</div></div>';
describe('The MCTTable Controller', function () {
@ -55,19 +62,7 @@ define(
watches[event] = callback;
});
mockElement = jasmine.createSpyObj('element', [
'find',
'prop',
'on'
]);
mockElement.find.andReturn(mockElement);
mockElement.prop.andReturn(0);
mockElement[0] = {
scrollTop: 0,
scrollHeight: 500,
offsetHeight: 1000
};
mockElement = $(MOCK_ELEMENT_TEMPLATE);
mockExportService = jasmine.createSpyObj('exportService', [
'exportCSV'
]);